bin/maths in maths-0.0.3 vs bin/maths in maths-0.0.4

- old
+ new

@@ -29,20 +29,11 @@ end puts else begin result = parser.parse(command) - - if result.nil? - output = "Undefined" - elsif !result.is_a?(Numeric) - output = result.to_s - elsif result.frac == 0 - output = result.to_i.to_s - else - output = result.to_s("F") - end - puts "= #{output}" + + puts "= #{Maths::Formatter.format(result)}" rescue ParseError puts $! end end end \ No newline at end of file