Closed mvz closed 5 years ago
OK... philosophical question:
begin
a
rescue
b
rescue
c
end
becomes:
s(:begin,
s(:rescue,
s(:call, nil, :a).line(2),
s(:resbody, s(:array),
s(:call, nil, :b)),
s(:resbody, s(:array),
s(:call, nil, :c))
).line(2)
).line(1)
(several line numbers omitted for readability)
When remove_begin
gets called, it normally sets the inner thing (:rescue
on line "2") to the line of the begin it is removing (line 1)... If I fix your bug above, I change the behavior below so that the rescue is now line 2 and not line 1.
Does this FEEL right? (yes, I realize that the rescue token is on line 3... that's a separate matter)
I think yes, but I'm totally open to debating this...
In which case, this is fixed.
Does this FEEL right?
Yes, I think so.
The call to
foo
is on line 2, but gets parsed as line 1.