Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

verson 0.4.7. Fixed 'ls' bug in 1.8.7, oops. Updated some docs

  • Loading branch information...
commit 788e5d8ce87eabab72d7a28dda0d195adbb4459a 1 parent 971bba3
@banister banister authored
Showing with 13 additions and 13 deletions.
  1. +2 −2 lib/pry/commands.rb
  2. +1 −1  lib/pry/version.rb
  3. +10 −10 wiki/Customizing-pry.md
View
4 lib/pry/commands.rb
@@ -57,10 +57,10 @@ class Commands < CommandBase
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
View
2  lib/pry/version.rb
@@ -1,3 +1,3 @@
class Pry
- VERSION = "0.4.6"
+ VERSION = "0.4.7"
end
View
20 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"
Please sign in to comment.
Something went wrong with that request. Please try again.