spec icon indicating copy to clipboard operation
spec copied to clipboard

Cleanup proc_spec.rb and block_spec.rb

Open eregon opened this issue 3 years ago • 1 comments

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 avatar Oct 25 '22 15:10 eregon

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.

eregon avatar Oct 25 '22 15:10 eregon