summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
authorRyan Lopopolo <[email protected]>2019-07-09 01:42:40 -0700
committerRyan Lopopolo <[email protected]>2019-07-09 01:42:40 -0700
commit0ad5ba7a0f819cff87460d9b6f5691656ea75ade (patch)
treeec035ae72c7368902eeea3e906fcece23e88d6c7 /src/string.c
parenteab07daf92c9a8a2836923656d9e8f58583a52ba (diff)
downloadmruby-0ad5ba7a0f819cff87460d9b6f5691656ea75ade.tar.gz
mruby-0ad5ba7a0f819cff87460d9b6f5691656ea75ade.zip
Add a fast path for Float and Fixnum ranges for Range#max and Range#min
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.
Diffstat (limited to 'src/string.c')
0 files changed, 0 insertions, 0 deletions