Skip to content
Browse files

updated readme

  • Loading branch information...
1 parent 2d64a41 commit ed56b42dd92401e4f895d4929c204b174fd7f220 @banister banister committed Dec 9, 2010
Showing with 25 additions and 8 deletions.
  1. +24 −7 README.markdown
  2. +1 −1 lib/pry.rb
31 README.markdown
@@ -46,9 +46,8 @@ effect:
Test.instance_variable_get(:@y) #=> 20
-example: Pry sessions can nest arbitrarily deep so we can pry on
-objects inside objects:
+example: Pry sessions can nest arbitrarily deep so we can pry on objects inside objects:
Here we will begin Pry at top-level, then pry on a class and then on
an instance variable inside that class:
@@ -80,15 +79,15 @@ an instance variable inside that class:
example: Spawn a separate thread so you can use `Pry` to manipulate an
object without halting the program.
If we embed our `Pry.into` method inside its own thread we can examine
and manipulate objects without halting the program.
# Pry.into() without parameters opens up the top-level (main) { Pry.into }
Features and limitations
@@ -100,13 +99,31 @@ uses (such as implementing a quake-like console for games, for example). Here is
list of Pry's features along with some of its limitations given at the
* Pry can be invoked at any time and on any object in the running program.
* Pry sessions can nest arbitrarily deeply -- to go back one level of nesting type 'exit' or 'quit'
* Pry has multi-line support built in.
* Pry implements all the methods in the REPL chain separately: `Pry.r`
for reading; `` for eval; `Pry.rep` for printing; and `Pry.repl`
-for the loop (`Pry.into` is simply an alias for `Pry.repl`)
+for the loop (`Pry.into` is simply an alias for `Pry.repl`). You can
+invoke any of these methods directly depending on exactly what aspect of the functionality you need.
+* Pry does not pretend to be a replacement for `irb`,
+ and so does not have an executable. It is designed to be used by
+ other programs, not on its own. For a full-featured `irb` replacement
+ see [ripl](
+* Although Pry works fine in Ruby 1.9, only Ruby 1.8 syntax is
+ supported. This is because Pry uses the
+ [RubyParser](
+ gem internally to validate expressions, and RubyParser, as yet, only parses Ruby 1.8
+ code. In practice this usually just means you cannot use the new
+ hash literal syntax (this: syntax) or the 'stabby lambda' syntax
+ (->).
2 lib/pry.rb
@@ -36,7 +36,7 @@ class << self
# print
- def self.rep(target=TOP_LEVEL_BINDING)
+ def self.rep(target=TOPLEVEL_BINDING)
if !target.is_a?(Binding)
target = target.instance_eval { binding }

0 comments on commit ed56b42

Please sign in to comment.
Something went wrong with that request. Please try again.