aboutsummaryrefslogtreecommitdiff
path: root/ruby/step1_read_print.rb
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-04-19 13:04:09 -0500
committerJoel Martin <github@martintribe.org>2014-04-19 13:04:09 -0500
commit86b689f3d7111a9fa13da389a30f3dfdf877d1a4 (patch)
treed72b065f9f987e291f892ceee5a8640363bfd9df /ruby/step1_read_print.rb
parent718887c3019c49fc807bc18fbd5feb975ec03c85 (diff)
downloadmal-86b689f3d7111a9fa13da389a30f3dfdf877d1a4.tar.gz
mal-86b689f3d7111a9fa13da389a30f3dfdf877d1a4.zip
All: *ARGV* and *host-language*. Misc syncing/fixes.
Diffstat (limited to 'ruby/step1_read_print.rb')
-rw-r--r--ruby/step1_read_print.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/ruby/step1_read_print.rb b/ruby/step1_read_print.rb
index 617323e..ded992a 100644
--- a/ruby/step1_read_print.rb
+++ b/ruby/step1_read_print.rb
@@ -24,10 +24,12 @@ def REP(str)
return PRINT(EVAL(READ(str), {}))
end
+# repl loop
while line = _readline("user> ")
begin
puts REP(line)
rescue Exception => e
- puts "Error: %{e}"
+ puts "Error: #{e}"
+ puts "\t#{e.backtrace.join("\n\t")}"
end
end