lib/code/object/decimal.rb in code-ruby-0.6.4 vs lib/code/object/decimal.rb in code-ruby-0.6.5

- old
+ new

@@ -7,12 +7,10 @@ def initialize(decimal, exponent: nil) @raw = BigDecimal(decimal) return unless exponent - unless exponent.is_a?(Number) - raise ::Code::Error::TypeError, "exponent is not a number" - end + raise ::Code::Error::TypeError, "exponent is not a number" unless exponent.is_a?(Number) @raw *= 10**exponent.raw end def self.name