diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-07-30 06:41:15 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-07-30 06:41:15 +0000 |
commit | db41803494d15d2bf3fb2da958388f175781b42a (patch) | |
tree | d0b0f31eea2417b50749380998cbb4bec65d7f60 | |
parent | 34fc61ff48cea080c5bc79368dea851c71acb1c4 (diff) |
debug.rb - readline fixed
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/debug.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/debug.rb b/lib/debug.rb index 906a1fb7d3..78a0ce245e 100644 --- a/lib/debug.rb +++ b/lib/debug.rb @@ -1,11 +1,11 @@ class DEBUGGER__ begin require 'readline' - def readline(prompt) - Readline::readline(prompt, true) + def readline(prompt, hist) + Readline::readline(prompt, hist) end rescue LoadError - def readline(prompt) + def readline(prompt, hist) STDOUT.print prompt STDOUT.flush line = STDIN.gets @@ -60,7 +60,7 @@ class DEBUGGER__ end @frames[0] = binding display_expressions(binding) - while input = readline("(rdb:-) ") + while input = readline("(rdb:-) ", true) if input == "" input = DEBUG_LAST_CMD[0] else @@ -112,9 +112,7 @@ class DEBUGGER__ when /^del(?:ete)?(?:\s+(\d+))?$/ pos = $1 unless pos - STDOUT.print "clear all breakpoints? (y/n) " - STDOUT.flush - input = readline + input = readline("clear all breakpoints? (y/n) ", false) if input == "y" for b in @break_points b[0] = false @@ -141,7 +139,7 @@ class DEBUGGER__ when /^undisp(?:lay)?(?:\s+(\d+))?$/ pos = $1 unless pos - input = readline("clear all expressions? (y/n) ") + input = readline("clear all expressions? (y/n) ", false) if input == "y" for d in @display d[0] = false @@ -261,7 +259,7 @@ class DEBUGGER__ return when /^q(?:uit)?$/ - input = readline("really quit? (y/n) ") + input = readline("really quit? (y/n) ", false) exit if input == "y" when /^p\s+/ |