From c8d1c7adfd566d09caaa6c0cf9a51379b8e7e950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=88king?= Date: Fri, 19 Apr 2013 19:24:21 -0500 Subject: [PATCH] Silence deprecation warning on Pry#repl --- lib/pry/pry_instance.rb | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/pry/pry_instance.rb b/lib/pry/pry_instance.rb index 24af019e..f540b06f 100644 --- a/lib/pry/pry_instance.rb +++ b/lib/pry/pry_instance.rb @@ -368,19 +368,10 @@ class Pry end private :handle_line - # @deprecated Use `Pry::REPL.new(pry, :target => target).start` instead. + # Potentially deprecated — Use `Pry::REPL.new(pry, :target => target).start` + # (If nested sessions are going to exist, this method is fine, but a goal is + # to come up with an alternative to nested sessions altogether.) def repl(target = nil) - @@repl_warning ||= (warn Pry::Helpers::CommandHelpers.unindent(<<-S); true) - DEPRECATION: Pry#repl is deprecated. Instead, use - - Pry::REPL.new(pry, :target => target).start - - where pry is the Pry instance you called #repl on and target is the - optional target parameter of #repl. - - Call stack: - #{caller.join("\n" + (' ' * 8))} - S Pry::REPL.new(self, :target => target).start end