Open gerrywastaken opened 8 years ago
# test for block
class RubyBlock
def begin_end_block
# this block is NOT detected due to assignment
result = begin
# empty
end
puts result
end
def do_end_block
# this block is detected despite assignment
result = [].each do
# empty
end
puts result
end
end
do-end assignment | begin-end assignment | begin-end no-assignment |
---|---|---|
+1
It seems that doing an assignment from some blocks results in it not being spotted as the beginning of a block. In the above example I get
def foo()
as my match for theend
for theif
block.edit: Thanks for making this awesome plugin!