1
1
class DEBUGGER__
2
2
begin
3
3
require 'readline'
4
- def readline ( prompt )
5
- Readline ::readline ( prompt , true )
4
+ def readline ( prompt , hist )
5
+ Readline ::readline ( prompt , hist )
6
6
end
7
7
rescue LoadError
8
- def readline ( prompt )
8
+ def readline ( prompt , hist )
9
9
STDOUT . print prompt
10
10
STDOUT . flush
11
11
line = STDIN . gets
@@ -60,7 +60,7 @@ def debug_command(file, line, id, binding)
60
60
end
61
61
@frames [ 0 ] = binding
62
62
display_expressions ( binding )
63
- while input = readline ( "(rdb:-) " )
63
+ while input = readline ( "(rdb:-) " , true )
64
64
if input == ""
65
65
input = DEBUG_LAST_CMD [ 0 ]
66
66
else
@@ -112,9 +112,7 @@ def debug_command(file, line, id, binding)
112
112
when /^del(?:ete)?(?:\s +(\d +))?$/
113
113
pos = $1
114
114
unless pos
115
- STDOUT . print "clear all breakpoints? (y/n) "
116
- STDOUT . flush
117
- input = readline
115
+ input = readline ( "clear all breakpoints? (y/n) " , false )
118
116
if input == "y"
119
117
for b in @break_points
120
118
b [ 0 ] = false
@@ -141,7 +139,7 @@ def debug_command(file, line, id, binding)
141
139
when /^undisp(?:lay)?(?:\s +(\d +))?$/
142
140
pos = $1
143
141
unless pos
144
- input = readline ( "clear all expressions? (y/n) " )
142
+ input = readline ( "clear all expressions? (y/n) " , false )
145
143
if input == "y"
146
144
for d in @display
147
145
d [ 0 ] = false
@@ -261,7 +259,7 @@ def debug_command(file, line, id, binding)
261
259
return
262
260
263
261
when /^q(?:uit)?$/
264
- input = readline ( "really quit? (y/n) " )
262
+ input = readline ( "really quit? (y/n) " , false )
265
263
exit if input == "y"
266
264
267
265
when /^p\s +/
0 commit comments