1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Copy input_stack from default one

This commit is contained in:
Ryan Fitzgerald 2012-09-06 00:08:24 -07:00
parent 931c15e110
commit 85b93129f5

View file

@ -97,13 +97,15 @@ class Pry
attributes = [ attributes = [
:input, :output, :commands, :print, :quiet, :input, :output, :commands, :print, :quiet,
:exception_handler, :hooks, :custom_completions, :exception_handler, :hooks, :custom_completions,
:prompt, :memory_size, :input_stack, :extra_sticky_locals :prompt, :memory_size, :extra_sticky_locals
] ]
attributes.each do |attribute| attributes.each do |attribute|
defaults[attribute] = Pry.send attribute defaults[attribute] = Pry.send attribute
end end
defaults[:input_stack] = Pry.input_stack.dup
defaults.merge!(options).each do |key, value| defaults.merge!(options).each do |key, value|
send("#{key}=", value) if respond_to?("#{key}=") send("#{key}=", value) if respond_to?("#{key}=")
end end