aboutsummaryrefslogtreecommitdiff
path: root/ruby/step0_repl.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/step0_repl.rb
parentdb4c329aff4621e05b92a55be4f18173f5a4f655 (diff)
downloadmal-718887c3019c49fc807bc18fbd5feb975ec03c85.tar.gz
mal-718887c3019c49fc807bc18fbd5feb975ec03c85.zip
Ruby,Python,C#: readline history fixes. Ruby include path.
Diffstat (limited to 'ruby/step0_repl.rb')
-rw-r--r--ruby/step0_repl.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/ruby/step0_repl.rb b/ruby/step0_repl.rb
index dd32b27..21d534a 100644
--- a/ruby/step0_repl.rb
+++ b/ruby/step0_repl.rb
@@ -1,4 +1,5 @@
-require "readline"
+$: << File.expand_path(File.dirname(__FILE__))
+require "mal_readline"
# read
def READ(str)
@@ -20,6 +21,6 @@ def REP(str)
return PRINT(EVAL(READ(str), {}))
end
-while line = Readline.readline("user> ", true)
+while line = _readline("user> ")
puts REP(line)
end