vsyrovat (Valentin Syrovatskiy)
- Login: vsyrovat
- Email: vsyrovat@gmail.com
- Registered on: 04/29/2014
- Last sign in: 04/29/2014
Issues
| open | closed | Total | |
|---|---|---|---|
| Assigned issues | 0 | 0 | 0 |
| Reported issues | 0 | 1 | 1 |
Activity
04/29/2014
-
05:28 AM Ruby Bug #9782: Array#bsearch skip first match while using block with complex condition
- .
Understood. Thanks for explanation. -
04:19 AM Ruby Bug #9782: Array#bsearch skip first match while using block with complex condition
- More accurate description: Array#bsearch cannot find first match while using block with equality condition:
Example:
$ irb
2.1.1 :001 > [1, 2].bsearch{|x| x == 1}
=> nil
(WRONG, expected 1)
2.1.1 :002 > [1, 2].bsearch{|x| x > 0... -
04:09 AM Ruby Bug #9782 (Rejected): Array#bsearch skip first match while using block with complex condition
- Description: Array#bsearch cannot find first match when using block with condition by hash key.
Example:
$ irb
2.1.1 :001 > [{a:1, b:2}, {a:3, b:4}].bsearch{|x| x[:a] == 1}
=> nil
(WRONG, expected {a:1, b:2})
2.1.1 :002 > [{a:3...