| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Drop support for Ruby 1.9.x
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Revert "Escape non-printing characters"
|
| | | |
|
|\ \ \
| | | |
| | | | |
Configure `code` as a supported editor on Pry::Editor
|
| |/ / |
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Methods that don't have a source location (e.g., C methods, or methods
created via metaprogramming or even `alias_method` to C methods) are not
reasonable possible matching methods for a "weird method" we need to
locate.
In this case `renamed_method_source_location` can also return `nil` if
the actual code in question is a bare script (i.e., no methods). If that
script is loaded via `eval` then we'll end up in the weird method path
in the first place, but no method matching can be found, and if a
no-source-location method exists, we'll return that.
Down the line that's particularly painful because the source loading
thinks it's a C method, but it can actually be from metaprogramming (and
`alias_method`!), and then `Pry::Method#pry_doc_info` raises an error,
and `wherami` breaks even though we already have valid `__FILE__` and
`__LINE__` values.
|
|/ |
|
| |
|
| |
|
|
|
|
| |
loading.
|
|
|
|
|
|
|
|
|
| |
* fix pry indent frozen error
* fix generation of mutable strings
* fix String.new with no argument
* rubocop: fix offences of the Style/EmptyLiteral cop
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mutex#synchronize will throw an error if called from code passed to
Signal.trap. This makes it impossible to start a working Pry session
inside a signal handler.
Currently, calling binding.pry inside signal handling code raises an
exception because Pry uses mutexes to solve various thread-safety
issues.
This commit updates Pry.start to detect whether we'll have the ability
to use Mutex#synchronize. If not, we'll print an error message and
return instead of raising an error.
https://github.com/pry/pry/issues/2191
|
|
|
|
|
|
|
|
| |
* validates file presence in Config#default_rc_file
Return `nil` if no default rc file is present in the filesystem.
This fixes the behavior if $XDG_CONFIG_HOME is set, but no rc file at
the path `$XDG_CONFIG_HOME/pry/pryrc` (while it may be at `~/.pryrc`).
|
|\
| |
| | |
ring: change guard priority so that the value at index can be read
|
| |
| |
| |
| | |
Fixes #2199 (`_out_` Ring is ill-addressible)
|
|/
|
|
|
|
|
|
| |
The `--no-history` option was almost ten years ago, in db649858a, when
the object at `Pry.config.history` was still an `OpenStruct` (added in
e1d9763c2, just over ten years ago!). The contract on the configuration
history object changed in e5556a2be. This commit brings the
`--no-history` option up to date with that refactor.
|
| |
|
|\
| |
| | |
Deprecate the option "--plugins" on CLI
|
| |
| |
| |
| | |
exist anymore
|
| |
| |
| |
| |
| |
| |
| | |
Fixes #2181 (Bad formatting)
One of the regexps matches against string that were already colored. To prevent
that I used a negative look-ahead and rejected color sequences.
|
|\ \
| | |
| | | |
Fix breakage in output with colors disabled
|
| | |
| | |
| | |
| | | |
The previous implementation was removing more than that. When Pry.color = false, it was messing up the output of a few commands.
|
|\ \ \
| |_|/
|/| | |
Escape non-printing characters
|
| |/ |
|
| | |
|
|\ \
| | |
| | | |
Remove autoloading of plugins
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| |_|/
|/| | |
Update `?` alias to use show-source
|
| | |
| | |
| | |
| | | |
`show-doc` is deprecated in favor of `show-source -d`. Updating the `?` alias accordingly.
|
|/ /
| |
| |
| | |
Undefining a nonexistent definition is an error in Ruby. This has not been a problem because there always was `Object#=~` predefined. But we are planning to delete that useless method. This would become an error unless properly guarded.
|
| | |
|
|\ \
| | |
| | | |
pry-backtrace frozen bug
|
| |/ |
|
|\ \
| | |
| | | |
Improve appearance of help command listing
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit improves the appearance of regex aliases in the help index
by storing the result of calling #inspect on the regex as the listing.
For example, consider the `whereami` alias `/whereami[!?]+/`.
Previously this would appear in the help index as
`(?-mix:whereami[!?]+)`. This commit fixes this so it appears as
`/whereami[!?]+/`.
|
| |/ |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Returning `nil` on unknown option was default behaviour for Pry v0.12.x. In
e5556a2be8627ec3fe594c738f10422d5a1f5d43 I changed that but I am not sure if it
was intentional. This breaks plugins such as
pry-theme (https://github.com/kyrylo/pry-theme/issues/59).
Returning `nil` makes more sense, because we can write code like this:
```
Pry.config.foo ||= 123
```
...whereas as of now this is no longer possible and you would need to use
`respond_to?` to achieve the same effect.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously when catching syntax errors in the REPL, we were only showing
the last syntax error displayed by the ruby output. However, ruby can
generate multiple syntax error messages within a single SyntaxException.
For example, this code generates multiple syntax error messages:
```
$ ruby -e 'puts {"key"=>"val"}.to_json'
-e:1: syntax error, unexpected =>, expecting '}'
puts {"key"=>"val"}.to_json
-e:1: syntax error, unexpected '}', expecting end-of-input
puts {"key"=>"val"}.to_json
```
We can't predict which error message would be most helpful for the
consumer - we should show both of them.
This commit modifies the string replacement we're doing when printing
SyntaxExceptions so any number of syntax error lines will be shown
correctly.
Issue: https://github.com/pry/pry/issues/2102
The error message of SyntaxError is different from Ruby's one
|