Pry v0.13.0 Release Notes
Release Date: 2020-03-21 // about 4 years ago-
๐ Features
- โ Added metadata to the gem (such as changelog URI, source code URI & bug tracker URI), so it shows on https://rubygems.org/gems/pry (#1869)
- โ Added ability to forward ARGV to a Pry session via
--
(or-
) when launching Pry from shell (#1902) - โ Added
Pry::Config::LazyValue
&Pry::Config::MemoizedValue
, which allow storing callable procs in the config (#2024) - โ Added the
rc_file
config option that tells Pry the path topryrc
(#2027) - โ Added the
--code
flag to thewtf
command, which shows code for each backtrace frame (#2037) - โ Added the ability to paste method call chains with leading dots (#2060)
API changes
Pry::Prompt
is a class now and it can be instantiated to create new prompts on the fly that are not registered withPry::Prompt#add
. Learn more about its API in the docs (#1877)
๐ Deprecations
- ๐ Deprecated
Pry.config.exception_whitelist
in favor ofPry.config.unrescued_exceptions
(#1874) - ๐ Deprecated
Pry.config.prompt = Pry::Prompt[:simple][:value]
in favor ofPry.config.prompt = Pry::Prompt[:simple]
when setting Pry prompt viapryrc
.Pry::Prompt[:simple]
would return an instance ofPry::Prompt
instead ofHash
(#1877) - ๐ Deprecated setting prompt via an array of two procs: (#1877)
# Deprecated, emits a warning. Pry.config.prompt = [proc {}, proc {}]
This will be removed in the next release.
- ๐ Deprecated the
show-doc
command. Theshow-source -d
is the new recommended way of reading docs (#1934) - Deprecated
Pry::Command#_pry_
. UsePry::Command#pry_instance
instead (#1989)
๐ฅ Breaking changes
- โ Deleted deprecated
Pry::Platform
(#1863) - โ Deleted deprecated
Pry#{input/output}_array
(#1884) - โ Deleted deprecated
Pry::Prompt::MAP
(#1866) - โ Deleted deprecated methods of
Pry::Helpers::BaseHelpers
such asmac_osx?
,linux?
,windows?
,windows_ansi?
,jruby?
,jruby_19?
,mri?
,mri_19?
,mri_2?
(#1867) - โ Deleted deprecated
Pry::Command#text
(#1865) - Deleted deprecated
Pry::Method#all_from_common
(#1868) - โ Deleted
install-command
(#1979) - Deleted
Pry::Helpers::BaseHelpers#command_dependencies_met?
(#1979) - โ Deleted commands:
gem-cd
,gem-install
,gem-list
,gem-open
,gem-readme
,gem-search
,gem-stats
(#1981) - โ Deleted deprecated commands:
edit-method
andshow-command
(#2001) - โ Deleted
Pry::Command#disabled_commands
(#2001) - โ Deleted
Pry::BlockCommand#opts
(use#context
instead) (#2003) - โ Deleted
Pry.lazy
(usePry::Config::LazyValue
instead) (#2024)
๐ Bug fixes
- ๐ Fixed bug where using
Pry.config.prompt_name
can return aPry::Config::Lazy
instead of expected instance ofString
(#1890) - ๐ Fixed
LoadError
being raised when using auto completions and Bundler (#1896) - ๐ Fixed bug where
Pry.input_ring
doesn't append duplicate elements (#1898) - ๐ Fixed Ruby 2.6 warning about
Binding#source_location
(#1904) - ๐ Fixed wrong
winsize
when customoutput
is passed to Pry (#2045) - Fixed
XDG_CONFIG_HOME
&XDG_DATA_HOME
precedence. When these env variables are set, Pry no longer uses traditional files like~/.pryrc
&~/.pry_history
. Instead, the env variable paths are loaded first (#2056) - ๐ Fixed the
$SAFE will become a normal global variable in Ruby 3.0
warning on Ruby 2.7 (#2107) - ๐ Fixed bug when
whereami -c
cannot show beginning of the class, which is on the same line as another expression (#2098) - ๐ Fixed bug when
Object#owner
is defined, which results into somewhat broken method introspection (#2113) - ๐ Fixed bug when indentation leaves parts of input after pressing enter when Readline is enabled with mode indicators for vi mode. This was supposed to be fixed in v0.12.2 but it regressed (#2114)