mishandles nested `masgn` nodes in block args
jaynetics opened this issue · 3 comments
jaynetics commented
str = 'a { |(b, (c, d))| }'
ast = RubyParser.new.parse(str)
# => s(:iter, s(:call, nil, :a), s(:args, s(:masgn, :b, s(:masgn, :c, :d))))
Ruby2Ruby.new.process(ast)
# => "a { |(b, masgn, c, d)| }"
str = 'a { |((b))| }'
ast = RubyParser.new.parse(str)
# => s(:iter, s(:call, nil, :a), s(:args, s(:masgn, s(:masgn, :b))))
Ruby2Ruby.new.process(ast)
# => RuntimeError (no clue: s(:masgn, :b))
zenspider commented
Nice catch. Wanna take a whack at it? (no is perfectly fine)
jaynetics commented
here's the whack :)
zenspider commented
Fixed. Thank you!