/usr/lib/ruby/vendor_ruby/benchmark/helpers.rb is in ruby-benchmark-ips 1.2.0+git.20130609.e47e416-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | module Benchmark
module Helpers
def fixnum_max
if Object.const_defined?(:RUBY_ENGINE)
case RUBY_ENGINE
when "ruby"
2 ** (wordsize - 2) - 1
when "rbx"
Fixnum::MAX
when "jruby"
9223372036854775807
else
raise "Maximum Fixnum size now known yet for #{RUBY_ENGINE}"
end
else
2 ** (wordsize - 2) - 1
end
end
module_function :fixnum_max
def fixnum_min
if Object.const_defined?(:RUBY_ENGINE)
case RUBY_ENGINE
when "ruby"
- 2 ** (wordsize - 2)
when "rbx"
Fixnum::MIN
when "jruby"
-9223372036854775808
else
raise "Maximum Fixnum size now known yet for #{RUBY_ENGINE}"
end
else
- 2 ** (wordsize - 2)
end
end
module_function :fixnum_min
def wordsize
8 * 1.size
end
module_function :wordsize
end
end
|