Skip to content

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

Merged
eregon merged 1 commit into
ruby:masterfrom
JuanitoFatas:proc/arguments
Jun 18, 2015
Merged

eregon merged 1 commit into
ruby:masterfrom
JuanitoFatas:proc/arguments

Conversation

@JuanitoFatas

Copy link
Copy Markdown
Member

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

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

@eregon

eregon commented Jun 17, 2015

Copy link
Copy Markdown
Member

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

eregon commented Jun 17, 2015

Copy link
Copy Markdown
Member

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

@JuanitoFatas

Copy link
Copy Markdown
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
Copy Markdown
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

eregon commented Jun 18, 2015

Copy link
Copy Markdown
Member

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

@eregon

eregon commented Jun 18, 2015

Copy link
Copy Markdown
Member

Have a look at ea9f106.

@JuanitoFatas
JuanitoFatas deleted the proc/arguments branch June 18, 2015 14:11
@JuanitoFatas

Copy link
Copy Markdown
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants