lib/unitwise/ext/numeric.rb in unitwise-0.2.0 vs lib/unitwise/ext/numeric.rb in unitwise-0.2.1

- old
+ new

@@ -2,12 +2,10 @@ def convert(unit) Unitwise::Measurement.new(self, unit) end def method_missing(meth, *args, &block) - if Unitwise::Expression.decompose(meth) - self.convert(meth) - else - super(meth, *args, &block) - end + convert(meth) + rescue Unitwise::ExpressionError + super(meth, *args) end end \ No newline at end of file