Skip to content

May break on Ruby versions below 3.2.0 due to non-evaluatable Symbol#inspect #359

@prikha

Description

@prikha

For String and Symbol Unparser uses #inspect for serialization back to Ruby-code. Which makes sense. But apparently #inspect hasn't always worked the same way for Symbols across Ruby versions:

ruby-2.0.0-p0       :"8 >="
...
ruby-2.2.0-preview1 :"8 >="
ruby-2.2.0-preview2 :8 >=
...
ruby-3.2.0-preview1 :8 >=
ruby-3.2.0-preview2 :"8 >="
...
ruby-3.3.0          :"8 >="

This bug has been reported in Ruby itself and fixed in >3.2.0
https://bugs.ruby-lang.org/issues/18905

There is nothing to do about it, but might be of interest for those still running older Rubies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions