Skip to content

Commit

Permalink
Remove monkeypatch for ruby 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
sandstrom committed May 7, 2023
1 parent c94ff01 commit f67a344
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions lib/ipaddress.rb
Expand Up @@ -276,18 +276,3 @@ def self.deprecate(message = nil) # :nodoc:
def IPAddress(str)
IPAddress::parse str
end

#
# Compatibility with Ruby 1.8
#
if RUBY_VERSION =~ /^1\.8/
class Hash # :nodoc:
alias :key :index
end
module Math # :nodoc:
def Math.log2(n)
log(n) / log(2)
end
end
end

0 comments on commit f67a344

Please sign in to comment.