From 65b643209d82e7f04f5568aa1c22d3969fef3f2a Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 10 Sep 2016 10:51:57 +0900 Subject: [PATCH] No Fixnum --- lib/rake.rb | 1 - lib/rake/application.rb | 2 +- lib/rake/ext/fixnum.rb | 18 ------------------ 3 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 lib/rake/ext/fixnum.rb diff --git a/lib/rake.rb b/lib/rake.rb index ece6882c6..07b03284b 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -32,7 +32,6 @@ module Rake; end require "ostruct" require "rake/ext/string" -require "rake/ext/fixnum" require "rake/win32" diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 464b11374..e94f17290 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -449,7 +449,7 @@ def standard_rake_options # :nodoc: "(default is number of CPU cores + 4)", lambda { |value| if value.nil? || value == "" - value = Fixnum::MAX + value = Float::INFINITY elsif value =~ /^\d+$/ value = value.to_i else diff --git a/lib/rake/ext/fixnum.rb b/lib/rake/ext/fixnum.rb deleted file mode 100644 index 56079ee6d..000000000 --- a/lib/rake/ext/fixnum.rb +++ /dev/null @@ -1,18 +0,0 @@ -#-- -# Extensions to fixnum to define some constants missing from Ruby itself - -class Fixnum - - unless constants.include? :MAX - - # future versions of Ruby may end up defining this constant - # in a more portable way, as documented by Matz himself in: - # - # https://bugs.ruby-lang.org/issues/7517 - # - # ... but until such time, we define the constant ourselves - MAX = (2**(0.size * 8 - 2) - 1) # :nodoc: - - end - -end