Skip to content

Fixnum#to_s seems to generate strings immune to #[]= #1551

@dennyabraham

Description

@dennyabraham

Test code

x = 100.to_s
x[0] = '2'
p x

MRI result

"200"

JRuby result

"100"

Tested against
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.5.0] and jruby 1.7.2 (1.9.3p327) 2013-01-04 302c706 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_12-ea-b08 +indy [darwin-x86_64]

see https://gist.github.com/dennyabraham/9400684

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions