Issue 69: parser doesn't handle method[space]statement well #118

consiliens opened this Issue Aug 26, 2011 · 0 comments


None yet
1 participant

consiliens commented Aug 26, 2011

Reported by rogerpack2005, May 30, 2011
This line will print 'true' in ruby, print nothing.
puts ('3' + '4') == '5'


puts (3 + 4) == 5

also fails in an odd way (Mirah::InternalCompilerError: Cannot find instance method ==(byte) on


Comment 1 by project member, Jun 2, 2011
Looks like we treat $Space $LParen ... as paren_args, but jruby treats it as call_args. So we're parsing this as:
(puts('3'+'4')) == '5'

Then I guess we're just dropping it since the return value is ignored, but we shouldn't be doing that to a function call which could (and does in this case) have side effects.

Comment 2 by rogerpack2005, Jun 2, 2011
I don't get any output here, so I'm not sure what's going on...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment