Jump to content

Pry (software)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 69.119.57.22 (talk) at 22:57, 13 March 2016 (Features: Converted `...` markup to <code>...</code> for proper display as Wikipedia doesn't support `...` as GitHub does.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Pry REPL
Developer(s)John Mair (banisterfiend), Conrad Irwin, …many more
Stable release
0.10.0 / June 9, 2014 (2014-06-09)
Repository
Written inRuby
Operating systemCross-platform
PlatformRuby interpreter
TypeRuby shell
License[1]
MIT License
Websitehttp://www.pryrepl.org/

Pry is an interactive shell for the Ruby programming language. It is notable for its Smalltalk-inspired[1] ability to start a REPL within a running program. This lets programmers debug and modify the current state of a system.

Features

Pry exposes most of its introspective capabilities using a filesystem metaphor.[2] For example, it has a cd command to start interacting with a particular object, and uses ls to list methods and variables.

It is possible to start Pry at any point inside a running program.[3] Due to the reflective nature of Ruby, this lets the programmer inspect the program, change its current state, or correct the source code without restarting the process.

A number of third party plugins are available for Pry,[1] these add tighter integration with other Ruby projects, enhance the abilities of Pry itself, and make Pry available over a remote connection.

Competitors

The main competitor to Pry is IRB, a standalone interactive shell that is packaged with releases of the Ruby programming language. There are a reasonable number of third-party plugins that add features to make IRB behave more like Pry, packaged as irbtools.[citation needed]

There are other projects to bring a better-than-IRB REPL to Ruby, such as ripl, but they are yet to see widespread adoption.[citation needed]

See also

References

  1. ^ a b The Pry Ecosystem — John Mair, 2012 link
  2. ^ Pry — Reuven M. Lerner, LinuxJournal, July 2012, pp28 link
  3. ^ Interactive Debugging With Pry — Alan MacDougall, 2012 link