Ruby 2.0 parser doesn't intern symbol strings in literal symbol array #970

Merged
merged 1 commit into from Aug 28, 2013

Projects

None yet

2 participants

@mwarren
Contributor
mwarren commented Aug 24, 2013

Symbols created using a literal symbol array don't have the same identities as the same symbols created outside of a literal symbol array:

$ JRUBY_OPTS="--2.0" jirb
2.0.0-p247 :001 > [JRUBY_VERSION, RUBY_VERSION]
 => ["1.7.5.dev", "2.0.0"]
2.0.0-p247 :002 > %i(foo).include?(:foo)
 => false

org.jruby.parser.ParserSupport#asSymbol is not interning. This pull request adds the intern() call.

@mwarren mwarren referenced this pull request Aug 24, 2013
Closed

dup of #970 #969

@enebo enebo merged commit a0e1040 into jruby:master Aug 28, 2013

1 check passed

default The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment