Class: Numeric

Inherits:
Object show all
Defined in:
lib/chef/monkey_patches/numeric.rb,
lib/chef/monkey_patches/numeric.rb

Overview

String elements referenced with [] <= 1.8.6 return a Fixnum. Cheat to allow for the simpler “test”.ord construct

Instance Method Summary collapse

Instance Method Details

#fdiv(other) ⇒ Object



3
4
5
# File 'lib/chef/monkey_patches/numeric.rb', line 3

def fdiv(other)
  to_f / other
end

#ordObject



12
13
14
# File 'lib/chef/monkey_patches/numeric.rb', line 12

def ord
  return self
end