summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoichi ITO <koic.ito@gmail.com>2016-12-10 19:27:24 +0900
committerRomain Tartière <romain@blogreen.org>2017-08-29 21:54:10 +0200
commitfd5b2e0e08b59d2b8f8c153405ab2c9d6f0fe3e4 (patch)
tree073cc6ef3b36468afb4575cc2058b01237533896
parent7f68225cc4a72c00b310c1ecbd6900b193ac2ec6 (diff)
downloadipaddress-fd5b2e0e08b59d2b8f8c153405ab2c9d6f0fe3e4.tar.gz
Integer Unification for Ruby 2.4.0+
-rw-r--r--lib/ipaddress/prefix.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ipaddress/prefix.rb b/lib/ipaddress/prefix.rb
index a0e3bb0..136f2d3 100644
--- a/lib/ipaddress/prefix.rb
+++ b/lib/ipaddress/prefix.rb
@@ -55,10 +55,10 @@ module IPAddress
#
# Sums two prefixes or a prefix to a
- # number, returns a Fixnum
+ # number, returns a Integer
#
def +(oth)
- if oth.is_a? Fixnum
+ if oth.is_a? Integer
self.prefix + oth
else
self.prefix + oth.prefix
@@ -68,10 +68,10 @@ module IPAddress
#
# Returns the difference between two
# prefixes, or a prefix and a number,
- # as a Fixnum
+ # as a Integer
#
def -(oth)
- if oth.is_a? Fixnum
+ if oth.is_a? Integer
self.prefix - oth
else
(self.prefix - oth.prefix).abs