Skip to content

Issue with Ruby 3.1.5 #455

Open
Open
@rdimartino

Description

@rdimartino

I noticed this from the test failures on this PR

There's different behavior between Ruby 3.1.4 and 3.1.5

Ruby 3.1.4

❯ rbenv shell 3.1.4
❯ bundle exec stree format -e 'foo::x = 1'
foo.x = 1
❯ bundle exec stree ast -e 'foo::x = 1'
(program (statements ((assign (field (vcall (ident "foo")) :"::" (ident "x")) (int "1")))))

Ruby 3.1.5

❯ rbenv shell 3.1.5
❯ bundle exec stree format -e 'foo::x = 1'
undefined method `comments' for 73:Integer

      operator == :"::" ? [] : operator.comments
                                       ^^^^^^^^^
❯ bundle exec stree ast -e 'foo::x = 1'   
(program (statements ((assign (field (vcall (ident "foo")) 73 (ident "x")) (int "1")))))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions