lib/ripper-plus/transformer.rb in ripper-plus-1.0.0 vs lib/ripper-plus/transformer.rb in ripper-plus-1.0.1
- old
+ new
@@ -96,9 +96,16 @@
param_node = tree[4]
body = tree[5]
transform_params(param_node, scope_stack)
transform_tree(body, scope_stack)
end
+ when :rescue
+ list, name, body = tree[1..3]
+ transform_tree(list, scope_stack)
+ if name
+ add_variables_from_lhs(name, scope_stack)
+ end
+ transform_tree(body, scope_stack)
when :method_add_block
call, block = tree[1..2]
# first transform the call
transform_tree(call, scope_stack)
# then transform the block
\ No newline at end of file