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] Issue with default block arguments #2878

Closed
bjfish opened this issue Apr 27, 2015 · 2 comments
Closed

[Truffle] Issue with default block arguments #2878

bjfish opened this issue Apr 27, 2015 · 2 comments
Assignees

Comments

@bjfish
Copy link
Contributor

bjfish commented Apr 27, 2015

Found in MRI test_syntax.rb:
Example

def yieldme
  yield
end

yieldme {  | methods = [['map', 'no'], ['inject([])', 'with']] |
    puts "METHODS `#{methods}`"
}

Expected (ruby, jruby)

METHODS `[["map", "no"], ["inject([])", "with"]]`

Actual

METHODS `map`
@chrisseaton chrisseaton added this to the truffle-dev milestone Apr 27, 2015
@chrisseaton chrisseaton self-assigned this Apr 27, 2015
@chrisseaton
Copy link
Contributor

It's not blocks - it's any default argument that has an array literal on the RHS.

def foo(methods=[14])
  p methods
end

foo

@chrisseaton
Copy link
Contributor

Fixed in 146856d

@enebo enebo added this to the Invalid or Duplicate 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