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

Projects
None yet
2 participants
@mwarren
Copy link
Contributor

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 added a commit that referenced this pull request Aug 28, 2013

Merge pull request #970 from mwarren/qsym_intern_fix
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

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
You can’t perform that action at this time.