Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
56929362
Commit
56929362
authored
Jul 09, 2019
by
Ryan Lopopolo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Range#min fast path with exclusive range
parent
0ad5ba7a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
1 deletion
+1
-1
mrbgems/mruby-range-ext/mrblib/range.rb
mrbgems/mruby-range-ext/mrblib/range.rb
+0
-1
mrbgems/mruby-range-ext/test/range.rb
mrbgems/mruby-range-ext/test/range.rb
+1
-0
No files found.
mrbgems/mruby-range-ext/mrblib/range.rb
View file @
56929362
...
...
@@ -58,7 +58,6 @@ class Range
return
nil
if
val
==
last
&&
exclude_end?
min
=
val
min
-=
1
if
exclude_end?
return
min
end
...
...
mrbgems/mruby-range-ext/test/range.rb
View file @
56929362
...
...
@@ -87,6 +87,7 @@ end
assert
(
'Range#min'
)
do
# returns the minimum value in the range when called with no arguments
assert_equal
1
,
(
1
..
10
).
min
assert_equal
1
,
(
1
...
10
).
min
# returns the minimum value in the Float range when called with no arguments
assert_equal
303.20
,
(
303.20
..
908.1111
).
min
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment