mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Add Numeric#{positive?,negative?}; CRuby2.3
This commit is contained in:
@@ -14,4 +14,12 @@ module Integral
|
||||
self
|
||||
end
|
||||
end
|
||||
|
||||
def positive?
|
||||
self > 0
|
||||
end
|
||||
|
||||
def negative?
|
||||
self < 0
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user