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

Cleanup proc_spec.rb and block_spec.rb #971

Open
eregon opened this issue Oct 25, 2022 · 1 comment
Open

Cleanup proc_spec.rb and block_spec.rb #971

eregon opened this issue Oct 25, 2022 · 1 comment
Assignees

Comments

@eregon
Copy link
Member

eregon commented Oct 25, 2022

Currently it's a mess with lambda in proc_spec.rb.

Proposed organization:

  • block_spec.rb: only passing a block to something else
  • lambda_spec.rb: as it is, lambda semantics
  • proc_spec.rb: remove lambda in it, and move most of block_spec.rb, so it's about Proc semantics.
@eregon eregon changed the title CLeanup proc_spec.rb and block_spec.rb Cleanup proc_spec.rb and block_spec.rb Oct 25, 2022
@eregon
Copy link
Member Author

eregon commented Oct 25, 2022

On further thought, I think we should not have block_spec.rb, it's too confusing.
Let's move the block-passing specs to method_spec.rb.
And lambda_spec.rb is mostly redundant with method_spec.rb in terms of argument handling, so I don't mind if lambda isn't tested in many cases, it's the same anyway.

So then we have a clear proc_spec.rb vs lambda_spec.rb separation, and no "block" to confuse us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants