aboutsummaryrefslogtreecommitdiff
path: root/ruby/step3_env.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/step3_env.rb
parentdb4c329aff4621e05b92a55be4f18173f5a4f655 (diff)
downloadmal-718887c3019c49fc807bc18fbd5feb975ec03c85.tar.gz
mal-718887c3019c49fc807bc18fbd5feb975ec03c85.zip
Ruby,Python,C#: readline history fixes. Ruby include path.
Diffstat (limited to 'ruby/step3_env.rb')
-rw-r--r--ruby/step3_env.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/ruby/step3_env.rb b/ruby/step3_env.rb
index 7266424..88811f0 100644
--- a/ruby/step3_env.rb
+++ b/ruby/step3_env.rb
@@ -1,4 +1,5 @@
-require "readline"
+$: << File.expand_path(File.dirname(__FILE__))
+require "mal_readline"
require "types"
require "reader"
require "printer"
@@ -66,7 +67,7 @@ repl_env.set(:-, lambda {|a,b| a - b})
repl_env.set(:*, lambda {|a,b| a * b})
repl_env.set(:/, lambda {|a,b| a / b})
-while line = Readline.readline("user> ", true)
+while line = _readline("user> ")
begin
puts REP[line]
rescue Exception => e