[ruby-core:125215] [Ruby Bug#21986] RubyVM::AST incorrect location for literals followed by modifier `if`
Issue #21986 has been reported by kddnewton (Kevin Newton). ---------------------------------------- Bug #21986: RubyVM::AST incorrect location for literals followed by modifier `if` https://bugs.ruby-lang.org/issues/21986 * Author: kddnewton (Kevin Newton) * Status: Open * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- ``` irb(main):001> RubyVM::AbstractSyntaxTree.parse("1.0if true") => (SCOPE@1:0-1:10 tbl: [] args: nil body: (IF@1:0-1:10 (TRUE@1:6-1:10) (FLOAT@1:3-1:3 1.0) nil)) irb(main):002> RubyVM::AbstractSyntaxTree.parse("1if true") => (SCOPE@1:0-1:8 tbl: [] args: nil body: (IF@1:0-1:8 (TRUE@1:4-1:8) (INTEGER@1:1-1:1 1) nil)) irb(main):003> ``` -- https://bugs.ruby-lang.org/
Issue #21986 has been updated by k0kubun (Takashi Kokubun). Backport changed from 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED, 4.0: REQUIRED to 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED, 4.0: DONE ruby_4_0 commit:926b0ec4ed0e181735f3778c3e6b79d891e70848 merged revision(s) commit:4644e4f2fafe45e2c49f18bc9712d0f5fff3d341. ---------------------------------------- Bug #21986: RubyVM::AST incorrect location for literals followed by modifier `if` https://bugs.ruby-lang.org/issues/21986#change-117267 * Author: kddnewton (Kevin Newton) * Status: Closed * Backport: 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED, 4.0: DONE ---------------------------------------- ``` irb(main):001> RubyVM::AbstractSyntaxTree.parse("1.0if true") => (SCOPE@1:0-1:10 tbl: [] args: nil body: (IF@1:0-1:10 (TRUE@1:6-1:10) (FLOAT@1:3-1:3 1.0) nil)) irb(main):002> RubyVM::AbstractSyntaxTree.parse("1if true") => (SCOPE@1:0-1:8 tbl: [] args: nil body: (IF@1:0-1:8 (TRUE@1:4-1:8) (INTEGER@1:1-1:1 1) nil)) irb(main):003> ``` -- https://bugs.ruby-lang.org/
participants (2)
-
k0kubun (Takashi Kokubun) -
kddnewton (Kevin Newton)