# File lib/pry/pry_class.rb, line 248 def self.run_command(command_string, options={}) options = { :target => TOPLEVEL_BINDING, :show_output => true, :output => Pry.config.output, :commands => Pry.config.commands }.merge!(options) # :context for compatibility with <= 0.9.11.4 target = options[:context] || options[:target] output = options[:show_output] ? options[:output] : StringIO.new pry = Pry.new(:output => output, :target => target, :commands => options[:commands]) pry.eval command_string end