-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
Environment Information
jruby 9.2.14.0 (2.5.7) 2020-12-08 ebe64ba OpenJDK 64-Bit Server VM 25.265-b01 on 1.8.0_265-b01 +jit [darwin-x86_64]
Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64
Expected Behavior
ruby -rripper -e 'pp Ripper.sexp("1 < 2")'On CRuby
[:program, [[:binary, [:@int, "1", [1, 0]], :<, [:@int, "2", [1, 4]]]]]Actual Behavior
On JRuby:
[:program,
[[:binary, [:@int, "1", [1, 0]], [:@op, "<", [1, 2]], [:@int, "2", [1, 4]]]]]Note the difference is the comparison operator gets reported as an @op node, whereas on CRuby it's just a Symbol. Interestingly, if you change it to 1 + 2, it'll be a Symbol.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels