1
0
Fork 0
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:
Ryan Fitzgerald 2011-11-26 23:17:04 -08:00
parent 96f2f555ce
commit ddae9fbfb0

View file

@ -334,11 +334,14 @@ class Pry
indented_val = val
end
begin
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
# If the given line is a valid command, process it in the context of the
# current `eval_string` and context.