diff options
-rw-r--r-- | lib/pry/pry_instance.rb | 2 | ||||
-rw-r--r-- | spec/pry_defaults_spec.rb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/pry/pry_instance.rb b/lib/pry/pry_instance.rb index fd1fc800..9ccca364 100644 --- a/lib/pry/pry_instance.rb +++ b/lib/pry/pry_instance.rb @@ -478,7 +478,7 @@ class Pry unless @prompt_warn @prompt_warn = true - warn( + Kernel.warn( "warning: setting prompt with help of " \ "`Pry.config.prompt = [proc {}, proc {}]` is deprecated. " \ "Use Pry::Prompt API instead" diff --git a/spec/pry_defaults_spec.rb b/spec/pry_defaults_spec.rb index 816481ff..fa0b8c1a 100644 --- a/spec/pry_defaults_spec.rb +++ b/spec/pry_defaults_spec.rb @@ -13,6 +13,9 @@ describe "test Pry defaults" do end describe "input" do + # Silence deprecation warnings. + before { allow(Kernel).to receive(:warn) } + it 'should set the input default, and the default should be overridable' do Pry.config.input = InputTester.new("5") Pry.config.output = @str_output |