Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove shadowed local variable

  • Loading branch information...
commit fe7905cfa8f82c3be00e86003a792809abfdffe3 1 parent 5143128
@rocky authored
Showing with 3 additions and 6 deletions.
  1. +3 −6 lib/iseq_extra.rb
View
9 lib/iseq_extra.rb
@@ -88,20 +88,17 @@ def locate_line(line)
def locate_line_with_children(line)
iseq = self
offset = iseq.locate_line(line)
- p ['++++1', offset, iseq]
return iseq, offset if offset
# Didn't find line in this iseq, so check if a contained
# InstructionSequence encompasses the line searched for
until offset
- child_iseq = iseq
+ current_iseq = iseq
iseq = iseq.parent
unless iseq
- # child_iseq is the top-most scope. Search down from here.
- top_iseq = child_iseq
+ # current_iseq is the top-most scope. Search down from here.
top_iseq.child_iseqs.each do |child_iseq|
- p ['++++2', offset, child_iseq, child_iseq.parent]
- next if child_iseq.equal? top_iseq
+ next if child_iseq.equal? current_iseq
if res = child_iseq.locate_line_with_children(line)
return res
end
Please sign in to comment.
Something went wrong with that request. Please try again.