| Age | Commit message (Collapse) | Author |
|
|
|
Before this patch:
$ bin/mruby -e 'p (2...4.0).min' #=> TypeError
After this patch (same as CRuby and without `mruby-range-ext`):
$ bin/mruby -e 'p (2...4.0).min' #=> 2
|
|
|
|
|
|
If no block is given and the Range has Fixnum or Float endpoints, do not iterate with
each and instead compare the endpoints directly. This implementation passes all of
the applicable specs from Ruby Spec.
|
|
The ISO standard does not include implicit type conversion using
`to_int`. This implicit conversion often causes vulnerability.
There will be no more attacks like #4120.
In addition, we have added internal convenience method `__to_int` which
does type check and conversion (from floats).
|
|
|
|
Range#first shouldn't call `Range#to_a` on infinity range.
|