seattlerb/ruby2ruby

BUG

Mrqqeat opened this issue · 1 comments

source:
@b = 1
@A = (@b += 1) > 5
c = true && false ? 3 : 0

call:
ast = RubyParser.new.parse(code)
str = Ruby2Ruby.new.process(ast)

str:
@b = 1
@A = (@b = (@b + 1) > 5) # Incorrect logic
c = true and false ? (3) : (0) # Incorrect logic

version:
ruby2ruby (2.5.0)
ruby_parser (3.20.0)

I honestly don't care enough about these edge cases... you're welcome to submit a patch, but I doubt I'll find the energy to get to this.