Pry | Ruby#


show-doc is deprecated

As of pry 0.14.1, show-doc is deprecated and show-source -d is to be used instead.

Pry’s show-doc is not available by default. It is a gem that has be be installed separately, either with gem install pry-doc or through Gemfile and Bundler`.

To use it, start a pry session and load pry-doc:

$ pry --simple-prompt
>> require 'pry-doc'
=> true

>> show-doc String#each_byte

Add require 'pry-doc' to ~/.pryrc.

Start pry. Either:

$ pry --simple-prompt

Or, if using bundler:

$ bundle exec pry --simple-prompt
>> show-doc String#each_codepoint

pry-doc gem and show-doc command

Note that we install the gem pry-doc, but use show-doc in the pry session!