lib/ripper-plus/transformer.rb in ripper-plus-1.2.1 vs lib/ripper-plus/transformer.rb in ripper-plus-1.2.2
- old
+ new
@@ -124,10 +124,10 @@
scope_stack.with_open_scope do
transform_params_then_body(tree, param_node, body, scope_stack)
end
when :rescue
list, name, body = tree[1..3]
- transform_tree(list, scope_stack)
+ transform_tree(list, scope_stack) if list
# Don't forget the rescue argument!
if name
add_variables_from_node(name, scope_stack)
end
transform_tree(body, scope_stack)
\ No newline at end of file