Actions
Bug #7726
closedbsearch should handle block result in a consistent way
Description
The documentation states that the block of bsearch must
return either true/false or a number.
If the block returns another object (other than nil), I feel that either
- It should be considered as 'truthy'
- It should raise a TypeError
Currently it does not raise an error and returns a result different than if true
was passed:
(1..3).bsearch{ 'x' } == (1..3).bsearch{ true } # => false
Actions
Like0
Like0