-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
splash params lose a nesting level *only* in #_to_proc #3371
Comments
sorry for the last comment: bad copy/paste, quite ashamed... |
@RobertDober anything is possible and the interactions in setting up block parameters is hairy but I do not think this is related to to_ary (or not because of to_ary). 'a' in the lambda is getting invoked and it is returning an array. If it did call to_ary it would return itself. So I think something else is wrong with our logic. |
Tom's still poking at the to_ary stuff so I'll have a look around on this one. |
Looks like this only happens when the to_proc result is a lambda. If I change it to a proc, the results match MRI and the brackets are not lost:
|
A somewhat smaller reproduction that doesn't involve map: class X
def to_proc
->(*a){ p a }
end
end
def foo; yield [1,2]; end
foo(&(X.new)) # => [[1, 2]] on MRI, [1, 2] on JRuby |
Great I can change the lambda to proc in my lib and release it for jruby 9k. Thx guys. KR |
This concerns 9k only, worx correctly in 1.7.6
When browsing through the issues I asked myself if this was not related to #3338?
The text was updated successfully, but these errors were encountered: