diff options
| author | Ryan Lopopolo <[email protected]> | 2019-07-09 02:08:14 -0700 |
|---|---|---|
| committer | Ryan Lopopolo <[email protected]> | 2019-07-09 02:08:14 -0700 |
| commit | 3b77b5fd394f9c9ba841e7bea8ea62dc6e8a3a1b (patch) | |
| tree | d43f16f800aed90cd1a6cb060a83dbe8bdf79f1c | |
| parent | 56929362f58ba5ad3ebe4131a6cc4259e6479dc0 (diff) | |
| download | mruby-3b77b5fd394f9c9ba841e7bea8ea62dc6e8a3a1b.tar.gz mruby-3b77b5fd394f9c9ba841e7bea8ea62dc6e8a3a1b.zip | |
Revert Float dependency in Range#each
| -rw-r--r-- | mrblib/range.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mrblib/range.rb b/mrblib/range.rb index 3e6dbfb24..392cc2274 100644 --- a/mrblib/range.rb +++ b/mrblib/range.rb @@ -15,8 +15,7 @@ class Range val = self.first last = self.last - # numerics are special - if (val.kind_of?(Fixnum) || val.kind_of?(Float)) && (last.kind_of?(Fixnum) || last.kind_of?(Float)) + if val.kind_of?(Fixnum) && last.kind_of?(Fixnum) # fixnums are special lim = last lim += 1 unless exclude_end? i = val |
