Project

General

Profile

Actions

Bug #21986

closed

RubyVM::AST incorrect location for literals followed by modifier `if`

Bug #21986: RubyVM::AST incorrect location for literals followed by modifier `if`

Added by kddnewton (Kevin Newton) about 2 months ago. Updated 18 days ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:125215]

Description

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>

Updated by nobu (Nobuyoshi Nakada) about 2 months ago Actions #1

  • Backport changed from 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN to 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED, 4.0: REQUIRED

Updated by nobu (Nobuyoshi Nakada) about 2 months ago Actions #2

  • Status changed from Open to Closed

Applied in changeset git|4644e4f2fafe45e2c49f18bc9712d0f5fff3d341.


[Bug #21986] Fix location of numeric literal

When checking for suffixes, do not flush the numeric literal token
even if no suffix is found.

Updated by k0kubun (Takashi Kokubun) 18 days ago Actions #3 [ruby-core:125461]

  • 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
Actions

Also available in: PDF Atom