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

Update spec/support/matchers.rb #9

Merged
merged 1 commit into from
Oct 11, 2012
Merged

Conversation

brixen
Copy link

@brixen brixen commented Oct 11, 2012

Rubinius does not yet destructure block (or method) arguments correctly in all cases in 1.9 mode. This change makes the specs pass on Rubinius.

It's not clear to me why the extra destructering is being used here. The #files method is returning an Array of two-element Arrays. Ruby will already destructure that Array into name, content.

I'm working on a smaller repro and I'll file an issue on Rubinius tracker when I get that.

Rubinius does not yet destructure block (or method) arguments in 1.9 mode. This change makes the specs pass on Rubinius. It's not clear to me why destructering is being used here. Ruby will already destructure a single Array-ish argument into separate block argument locals. In this case, unless you want, give `a, b` passed, `name, content = a` and NOT `name, content = a, b`, the unparenthesized (ie non-extra-level-destructuring) should work fine. If that makes any sense. :)
@brixen
Copy link
Author

brixen commented Oct 11, 2012

For reference rubinius/rubinius#1953

svenfuchs added a commit that referenced this pull request Oct 11, 2012
Update spec/support/matchers.rb
@svenfuchs svenfuchs merged commit 66531dc into travis-ci:master Oct 11, 2012
@svenfuchs
Copy link
Contributor

@brixen thank you! :)

everything14 pushed a commit that referenced this pull request Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants