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

[Truffle] Symbol to_proc issue #3544

Closed
bjfish opened this issue Dec 16, 2015 · 3 comments
Closed

[Truffle] Symbol to_proc issue #3544

bjfish opened this issue Dec 16, 2015 · 3 comments
Assignees
Milestone

Comments

@bjfish
Copy link
Contributor

bjfish commented Dec 16, 2015

Expected (ruby 2.1)

$ ruby -e 'a = { :a => 1 }.map(&:last); puts a'
1

Actual

$ jt e 'a = { :a => 1 }.map(&:last); puts a'
-e:1:in `method_missing': undefined method `last' for Symbol (NoMethodError)
    from -e:1:in `<main>'
    from -e:1:in `map'
    from -e:1:in `<main>'

Found while running

./bin/jruby -X+T -S gem list
@bjfish bjfish added the truffle label Dec 16, 2015
@bjfish
Copy link
Contributor Author

bjfish commented Dec 16, 2015

This might be related:

Expected:

$ ruby -e '{ :a => 1 }.map { |a| puts a.to_s }'
[:a, 1]

Actual

$ jt e '{ :a => 1 }.map { |a| puts a.to_s }'
a

@eregon eregon self-assigned this Dec 17, 2015
@eregon eregon closed this as completed in 5525b4f Dec 17, 2015
@eregon
Copy link
Member

eregon commented Dec 17, 2015

This should be fixed now, our Hash#map yielded 2 values instead of a pair Array.

@bjfish
Copy link
Contributor Author

bjfish commented Dec 17, 2015

@eregon Looks good, 👍 thanks!

@enebo enebo added this to the truffle-dev milestone Jan 20, 2016
@enebo enebo added this to the Non-Release milestone Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants