Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Aug 28, 2013

Conversation

@mwarren
Copy link
Contributor

@mwarren 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 mentioned this pull request Aug 24, 2013
enebo added a commit that referenced this pull request Aug 28, 2013
Ruby 2.0 parser doesn't intern symbol strings in literal symbol array
@enebo enebo merged commit a0e1040 into jruby:master Aug 28, 2013
1 check passed
1 check passed
@veganstraightedge
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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants