[前][次][番号順一覧][スレッド一覧]

ruby-changes:58092

From: Romain <ko1@a...>
Date: Thu, 3 Oct 2019 13:45:13 +0900 (JST)
Subject: [ruby-changes:58092] 1c999952e7 (master): Resolve unused local variable reported by LGTM

https://git.ruby-lang.org/ruby.git/commit/?id=1c999952e7

From 1c999952e74e9b5f1e882501580d5f2f5a92f142 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Romain=20Tarti=C3=A8re?= <romain@b...>
Date: Wed, 2 Oct 2019 10:26:39 -1000
Subject: Resolve unused local variable reported by LGTM

LGTM reports that the value assigned to local variable 'shared' is never
used:
https://lgtm.com/projects/g/ruby/ruby/snapshot/f319a5d064627c6641817ec2ed16b97b4d215148/files/misc/lldb_cruby.py#x6512c0281581a470:1

This problem was introduced in by the refactoring that took place in
7c496b6624f720d539e3c0b40f122a9422a13b99.

diff --git a/misc/lldb_cruby.py b/misc/lldb_cruby.py
index 688f897..3b46dcb 100755
--- a/misc/lldb_cruby.py
+++ b/misc/lldb_cruby.py
@@ -151,7 +151,7 @@ def lldb_inspect(debugger, target, result, val): https://github.com/ruby/ruby/blob/trunk/misc/lldb_cruby.py#L151
                 result.write(" (embed)")
             elif flags & RUBY_FL_USER2:
                 shared = val.GetValueForExpressionPath("->as.heap.aux.shared").GetValueAsUnsigned()
-                result.write(" (shared) shared=%016x")
+                result.write(" (shared) shared=%016x" % shared)
             else:
                 capa = val.GetValueForExpressionPath("->as.heap.aux.capa").GetValueAsSigned()
                 result.write(" (ownership) capa=%d" % capa)
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]