mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Revert "Change redundant String#replace..."
This reverts commit a4e37948a2
. String#clear is a
method that was introduced in Ruby 1.9, it's not available in 1.8.
This commit is contained in:
parent
7cd1e651a3
commit
6ae24abd5b
3 changed files with 3 additions and 3 deletions
|
@ -104,7 +104,7 @@ class Pry
|
|||
DEFAULT_CONTROL_D_HANDLER = proc do |eval_string, _pry_|
|
||||
if !eval_string.empty?
|
||||
# clear input buffer
|
||||
eval_string.clear
|
||||
eval_string.replace("")
|
||||
elsif _pry_.binding_stack.one?
|
||||
# ^D at top-level breaks out of loop
|
||||
_pry_.binding_stack.clear
|
||||
|
|
|
@ -10,7 +10,7 @@ class Pry
|
|||
create_command "!", "Clear the input buffer. Useful if the parsing process goes wrong and you get stuck in the read loop.", :use_prefix => false do
|
||||
def process
|
||||
output.puts "Input buffer cleared!"
|
||||
eval_string.clear
|
||||
eval_string.replace("")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -348,7 +348,7 @@ class Pry
|
|||
# from within Readline.
|
||||
rescue Interrupt
|
||||
output.puts ""
|
||||
eval_string.clear
|
||||
eval_string.replace("")
|
||||
return
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue