mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
always add input to history
This commit is contained in:
parent
96f2f555ce
commit
ddae9fbfb0
1 changed files with 6 additions and 3 deletions
|
@ -334,10 +334,13 @@ class Pry
|
||||||
indented_val = val
|
indented_val = val
|
||||||
end
|
end
|
||||||
|
|
||||||
if !process_command(val, eval_string, target)
|
begin
|
||||||
eval_string << "#{indented_val.rstrip}\n" unless val.empty?
|
if !process_command(val, eval_string, target)
|
||||||
|
eval_string << "#{indented_val.rstrip}\n" unless val.empty?
|
||||||
|
end
|
||||||
|
ensure
|
||||||
|
Pry.history << indented_val unless input.is_a?(StringIO)
|
||||||
end
|
end
|
||||||
Pry.history << indented_val unless input.is_a?(StringIO)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# If the given line is a valid command, process it in the context of the
|
# If the given line is a valid command, process it in the context of the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue