aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/numeric/inquiry.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/numeric/inquiry.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/numeric/inquiry.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/numeric/inquiry.rb b/activesupport/lib/active_support/core_ext/numeric/inquiry.rb
index b1a27dd698..7e7ac1b0b2 100644
--- a/activesupport/lib/active_support/core_ext/numeric/inquiry.rb
+++ b/activesupport/lib/active_support/core_ext/numeric/inquiry.rb
@@ -1,3 +1,4 @@
+unless 1.respond_to?(:positive?) # TODO: Remove this file when we drop support to ruby < 2.3
class Numeric
# Returns true if the number is positive.
#
@@ -17,3 +18,9 @@ class Numeric
self < 0
end
end
+
+class Complex
+ undef :positive?
+ undef :negative?
+end
+end