aboutsummaryrefslogtreecommitdiff
path: root/ruby/step2_eval.rb
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-04-17 22:23:07 -0500
committerJoel Martin <github@martintribe.org>2014-04-17 22:23:07 -0500
commit718887c3019c49fc807bc18fbd5feb975ec03c85 (patch)
tree8b0d1d2e501541c015e66f4cde0510bdd94db195 /ruby/step2_eval.rb
parentdb4c329aff4621e05b92a55be4f18173f5a4f655 (diff)
downloadmal-718887c3019c49fc807bc18fbd5feb975ec03c85.tar.gz
mal-718887c3019c49fc807bc18fbd5feb975ec03c85.zip
Ruby,Python,C#: readline history fixes. Ruby include path.
Diffstat (limited to 'ruby/step2_eval.rb')
-rw-r--r--ruby/step2_eval.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/ruby/step2_eval.rb b/ruby/step2_eval.rb
index 9318099..1454d8c 100644
--- a/ruby/step2_eval.rb
+++ b/ruby/step2_eval.rb
@@ -1,4 +1,5 @@
-require "readline"
+$: << File.expand_path(File.dirname(__FILE__))
+require "mal_readline"
require "types"
require "reader"
require "printer"
@@ -54,7 +55,7 @@ repl_env[:-] = lambda {|a,b| a - b}
repl_env[:*] = lambda {|a,b| a * b}
repl_env[:/] = lambda {|a,b| a / b}
-while line = Readline.readline("user> ", true)
+while line = _readline("user> ")
begin
puts REP[line]
rescue Exception => e