From 788e5d8ce87eabab72d7a28dda0d195adbb4459a Mon Sep 17 00:00:00 2001 From: John Mair Date: Sat, 12 Feb 2011 00:38:46 +1300 Subject: [PATCH] verson 0.4.7. Fixed 'ls' bug in 1.8.7, oops. Updated some docs --- lib/pry/commands.rb | 4 ++-- lib/pry/version.rb | 2 +- wiki/Customizing-pry.md | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/pry/commands.rb b/lib/pry/commands.rb index 164de3d3..8135ea23 100644 --- a/lib/pry/commands.rb +++ b/lib/pry/commands.rb @@ -57,10 +57,10 @@ class Pry case target_self when Module - c = with_constants ? target_self.constants : [] + c = with_constants ? target_self.constants.inspect : [].inspect output.puts "#{Pry.view(target.eval("local_variables + instance_variables + #{c}"))}" else - c = with_constants ? target_self.class.constants : [] + c = with_constants ? target_self.class.constants.inspect : [].inspect output.puts "#{Pry.view(target.eval("local_variables + instance_variables + #{c}"))}" end end diff --git a/lib/pry/version.rb b/lib/pry/version.rb index 74512454..5489b1fb 100644 --- a/lib/pry/version.rb +++ b/lib/pry/version.rb @@ -1,3 +1,3 @@ class Pry - VERSION = "0.4.6" + VERSION = "0.4.7" end diff --git a/wiki/Customizing-pry.md b/wiki/Customizing-pry.md index a5f9e9aa..02182f5f 100644 --- a/wiki/Customizing-pry.md +++ b/wiki/Customizing-pry.md @@ -18,12 +18,12 @@ are: Local customization (applied to a single Pry session) is done by passing config hash options to `Pry.start()` or to `Pry.new()`; also the same accessors as described above for the `Pry` class exist for a -Pry instance so that customization can occur during runtime. +Pry instance so that customization can occur at runtime. ### Input For input Pry accepts any object that implements the `readline` method. This -includes `IO` objects, `StringIO`, `Readline` and custom objects. Pry +includes `IO` objects, `StringIO`, `Readline`, `File` and custom objects. Pry initially defaults to using `Readline` for input. #### Example: Setting global input @@ -69,7 +69,7 @@ the current session is nested) like so: ### Output For output Pry accepts any object that implements the `puts` method. This -includes `IO` objects, `StringIO` and custom objects. Pry initially +includes `IO` objects, `StringIO`, `File` and custom objects. Pry initially defaults to using `$stdout` for output. #### Example: Setting global output @@ -109,8 +109,8 @@ A valid Pry command object must inherit from #### Example: Defining a command object and setting it globally class MyCommands < Pry::CommandBase - command "greet", "Greet the user." do |name| - output.puts "Hello #{name.capitalize}, how are you?" + command "greet", "Greet the user." do |name, age| + output.puts "Hello #{name.capitalize}, how does it feel being #{age}?" end end @@ -118,8 +118,8 @@ A valid Pry command object must inherit from Then inside a pry session: - pry(main)> greet john - hello John, how are you? + pry(main)> greet john 9 + Hello John, how does it feel being 9? => nil #### Example: Using a command object in a specific session @@ -165,9 +165,9 @@ command. ##### `delete` method -The `delete` method deletes a command or a group of a commands; it -can be useful when inheriting from another command set when you decide -to keep only a portion of inherited commands. +The `delete` method deletes a command or a group of commands. It +can be useful when inheriting from another command set and you wish +to keep only a portion of the inherited commands. class MyCommands < Pry::Commands delete "show_method", "show_imethod"