From 85b93129f5f6272d6b40f2f43d5044b4ea873ec5 Mon Sep 17 00:00:00 2001 From: Ryan Fitzgerald Date: Thu, 6 Sep 2012 00:08:24 -0700 Subject: [PATCH] Copy input_stack from default one --- lib/pry/pry_instance.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pry/pry_instance.rb b/lib/pry/pry_instance.rb index 9d9db3a6..e5be2bf5 100644 --- a/lib/pry/pry_instance.rb +++ b/lib/pry/pry_instance.rb @@ -97,13 +97,15 @@ class Pry attributes = [ :input, :output, :commands, :print, :quiet, :exception_handler, :hooks, :custom_completions, - :prompt, :memory_size, :input_stack, :extra_sticky_locals + :prompt, :memory_size, :extra_sticky_locals ] attributes.each do |attribute| defaults[attribute] = Pry.send attribute end + defaults[:input_stack] = Pry.input_stack.dup + defaults.merge!(options).each do |key, value| send("#{key}=", value) if respond_to?("#{key}=") end