From 3d14ef6368a695627c20030bc40f6c0ab3ea4c58 Mon Sep 17 00:00:00 2001 From: John Mair Date: Mon, 30 May 2011 03:41:40 +1200 Subject: [PATCH] migrating some commands from opts[:arg_string] to arg_string method --- lib/pry/default_commands/context.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/pry/default_commands/context.rb b/lib/pry/default_commands/context.rb index 3ecf8345..618c60cb 100644 --- a/lib/pry/default_commands/context.rb +++ b/lib/pry/default_commands/context.rb @@ -20,7 +20,7 @@ class Pry TOPLEVEL_BINDING.pry next else - Pry.start target.eval(opts[:arg_string]) + Pry.start target.eval(arg_string) end end @@ -54,16 +54,14 @@ class Pry end command "exit", "End the current Pry session. Accepts optional return value. Aliases: quit, back" do - str = remove_first_word(opts[:val]) - throw(:breakout, [opts[:nesting].level, target.eval(str)]) + throw(:breakout, [opts[:nesting].level, target.eval(arg_string)]) end alias_command "quit", "exit", "" alias_command "back", "exit", "" command "exit-all", "End all nested Pry sessions. Accepts optional return value. Aliases: !!@" do - str = remove_first_word(opts[:val]) - throw(:breakout, [0, target.eval(str)]) + throw(:breakout, [0, target.eval(arg_string)]) end alias_command "!!@", "exit-all", "" @@ -76,7 +74,7 @@ class Pry alias_command "!!!", "exit-program", "" command "!pry", "Start a Pry session on current self; this even works mid-expression." do - Pry.start(target) + target.pry end command "whereami", "Show the code context for the session. (whereami shows extra lines of code around the invocation line. Default: 5)" do |num|