Skip to content

Commit

Permalink
Don't use self-deprecated method
Browse files Browse the repository at this point in the history
Master pry currently complains on run_command because Pry#repl isn't supposed to be used anymore.  This makes run_command stop using that.

I don't know if it's 100% right to do it this way, thoughts?
  • Loading branch information
Josh Adams committed Feb 5, 2013
1 parent c252bfa commit 7eb5da2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pry/pry_class.rb
Expand Up @@ -227,9 +227,9 @@ def self.run_command(command_string, options={})

output = options[:show_output] ? options[:output] : StringIO.new

Pry.new(:output => output, :input => StringIO.new("#{command_string}\nexit-all\n"),
Pry::REPL.new(Pry.new(:output => output, :input => StringIO.new("#{command_string}\nexit-all\n"),
:commands => options[:commands],
:prompt => proc {""}, :hooks => Pry::Hooks.new).repl(options[:context])
:prompt => proc {""}, :hooks => Pry::Hooks.new), :target => options[:context]).start
end

def self.default_editor_for_platform
Expand Down

0 comments on commit 7eb5da2

Please sign in to comment.