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

RubySpec for creating a Proc using the block from an enclosing method #3203

Merged
merged 2 commits into from Nov 12, 2014
Merged

RubySpec for creating a Proc using the block from an enclosing method #3203

merged 2 commits into from Nov 12, 2014

Conversation

jimmycuadra
Copy link
Contributor

This patch adds two matching RubySpec examples for Proc.new and Kernel#proc that specify their behavior when called without an explicit block. Both examples pass on MRI, but only the Proc.new version will pass on Rubinius. See the context at #3202.

Kernel#proc is effectively an alias for Proc.new, so it might make sense to move the examples in spec/ruby/core/proc/new_spec.rb into a set of shared examples that are applied for both methods, but I opted not to do that without discussing it first and to keep this patch simple and small.

@jc00ke
Copy link
Member

jc00ke commented Nov 12, 2014

Can you add some spec tags too? I'm not sure we'll end up supporting this behavior, and we don't want out builds to fail because of it. Thanks!

Also, looks like this build might have failed for other reasons, but still, we should add the tag.

@jimmycuadra
Copy link
Contributor Author

Added a tag for Kernel#proc, since the Proc.new version passes. Let me know if I misunderstood and you want a fails tag on both examples.

jc00ke added a commit that referenced this pull request Nov 12, 2014
RubySpec for creating a Proc using the block from an enclosing method
@jc00ke jc00ke merged commit 2f86636 into rubinius:master Nov 12, 2014
@jc00ke
Copy link
Member

jc00ke commented Nov 12, 2014

Thanks!

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.

None yet

2 participants