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

[language/block] Add two specs to check SyntaxError for block arguments #83

Merged
merged 1 commit into from
Jun 18, 2015
Merged

[language/block] Add two specs to check SyntaxError for block arguments #83

merged 1 commit into from
Jun 18, 2015

Conversation

JuanitoFatas
Copy link
Member

This pull request adds two specs for block arguments syntax check.

Learned from here: thoughtbot/guides#335 (comment)

@eregon
Copy link
Member

eregon commented Jun 17, 2015

Looks good, but this should be in language/ since it raises a SyntaxError.
It might be worth having it for method parameters as well.


There is also some interesting behavior with this doubled _:

p lambda {|_,_|_}.(1,2) # => 1

But I would not consider that spec.

@eregon eregon closed this Jun 17, 2015
@eregon eregon reopened this Jun 17, 2015
@eregon
Copy link
Member

eregon commented Jun 17, 2015

(feel free to force push here or make another PR to move the spec to language)

@JuanitoFatas
Copy link
Member Author

(feel free to force push here or make another PR to move the spec to language)

👌 Will do it later today, thank you Benoit 👍

@JuanitoFatas
Copy link
Member Author

@eregon Please take a look, thanks!

eregon added a commit that referenced this pull request Jun 18, 2015
[Proc] Add two specs to check SyntaxError for block arguments
@eregon eregon merged commit c95400b into ruby:master Jun 18, 2015
@eregon
Copy link
Member

eregon commented Jun 18, 2015

@JuanitoFatas Thanks for you contribution!
I have a couple comments but I think they will expressed more clearly in an additional commit.

@eregon
Copy link
Member

eregon commented Jun 18, 2015

Have a look at ea9f106.

@JuanitoFatas JuanitoFatas deleted the proc/arguments branch June 18, 2015 14:11
@JuanitoFatas
Copy link
Member Author

Much better! Thanks @eregon 👏

@JuanitoFatas JuanitoFatas changed the title [Proc] Add two specs to check SyntaxError for block arguments [language/block] Add two specs to check SyntaxError for block arguments Jun 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants