aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
authorMehmet Emin İNAÇ <mehmetemininac@gmail.com>2015-05-13 21:03:51 +0300
committerMehmet Emin İNAÇ <mehmetemininac@gmail.com>2015-05-13 21:03:51 +0300
commited83f90d6124c4185a6d31010770e3c84d6be5fc (patch)
treeb8096f9d1d00e053426f75f0fda92c50c43f5ee3 /activesupport/lib/active_support/core_ext
parent94025927d79cbdbaf3b6e41fb2112d086f21dea3 (diff)
downloadrails-ed83f90d6124c4185a6d31010770e3c84d6be5fc.tar.gz
rails-ed83f90d6124c4185a6d31010770e3c84d6be5fc.tar.bz2
rails-ed83f90d6124c4185a6d31010770e3c84d6be5fc.zip
Move Integer#positive? and Integer#negative? query methods to Numeric class
By this way Integer, Rational, Float, Fixnum, Bignum classes have the same behaviour
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r--activesupport/lib/active_support/core_ext/integer.rb1
-rw-r--r--activesupport/lib/active_support/core_ext/numeric.rb1
-rw-r--r--activesupport/lib/active_support/core_ext/numeric/inquiry.rb (renamed from activesupport/lib/active_support/core_ext/integer/inquiry.rb)2
3 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/integer.rb b/activesupport/lib/active_support/core_ext/integer.rb
index f5b185b42b..a44a1b4c74 100644
--- a/activesupport/lib/active_support/core_ext/integer.rb
+++ b/activesupport/lib/active_support/core_ext/integer.rb
@@ -1,4 +1,3 @@
require 'active_support/core_ext/integer/multiple'
require 'active_support/core_ext/integer/inflections'
-require 'active_support/core_ext/integer/inquiry'
require 'active_support/core_ext/integer/time'
diff --git a/activesupport/lib/active_support/core_ext/numeric.rb b/activesupport/lib/active_support/core_ext/numeric.rb
index a6bc0624be..bcdc3eace2 100644
--- a/activesupport/lib/active_support/core_ext/numeric.rb
+++ b/activesupport/lib/active_support/core_ext/numeric.rb
@@ -1,3 +1,4 @@
require 'active_support/core_ext/numeric/bytes'
require 'active_support/core_ext/numeric/time'
+require 'active_support/core_ext/numeric/inquiry'
require 'active_support/core_ext/numeric/conversions'
diff --git a/activesupport/lib/active_support/core_ext/integer/inquiry.rb b/activesupport/lib/active_support/core_ext/numeric/inquiry.rb
index 17a04d4d63..b1a27dd698 100644
--- a/activesupport/lib/active_support/core_ext/integer/inquiry.rb
+++ b/activesupport/lib/active_support/core_ext/numeric/inquiry.rb
@@ -1,4 +1,4 @@
-class Integer
+class Numeric
# Returns true if the number is positive.
#
# 1.positive? # => true