bin/maths in maths-0.0.5 vs bin/maths in maths-0.0.6
- old
+ new
@@ -14,11 +14,10 @@
Readline.completion_proc = Proc.new do |str|
# TODO: Get this working
end
-
prompt = "maths> "
while command = Readline.readline(prompt, true)
break if /exit/i =~ command
if command == "vars" || command == "variables"
@@ -31,9 +30,10 @@
else
begin
result = parser.parse(command)
puts "= #{Maths::Formatter.format(result)}"
+ Maths::Brain.assign("$", result)
rescue ParseError
puts $!
end
end
end
\ No newline at end of file