lib/maths/calc.rb in maths-0.0.13 vs lib/maths/calc.rb in maths-0.0.14

- old
+ new

@@ -46,13 +46,13 @@ end when /\A\$/ @q.push [:VARIABLE, $&] # numbers - when /\A\d+(\.\d+)?([Ee]\d+)?/ + when /\A(\d+)?\.(\d+)?([Ee]\d+)?/ @q.push [:NUMBER, BigDecimal.new($&)] - # when /\A\d+/ - # @q.push [:NUMBER, BigDecimal.new($&)] + when /\A\d+([Ee]\d+)?/ + @q.push [:NUMBER, BigDecimal.new($&)] when /\A.|\n/o s = $& @q.push [s, s] end str = $'