Class: Fixnum
Overview
:nocov_19:
Instance Method Summary collapse
- #quo_with_units(other) ⇒ Unit, Integer (also: #quo, #/)
Instance Method Details
#quo_with_units(other) ⇒ Unit, Integer Also known as: quo, /
Note:
this patch is necessary for ruby 1.8 because cases where Integers are divided by Units don’t work quite right
9 10 11 12 13 14 15 16 |
# File 'lib/ruby_units/fixnum.rb', line 9 def quo_with_units(other) case other when RubyUnits::Unit self * other.inverse else quo_without_units(other) end end |