summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Prepare for v0.14.2 releaseAndré Luis Leal Cardoso Junior2023-01-081-1/+1
|
* Remove handle_read_errors 1.9 comment onlyDouglas Eichelberger2023-01-011-0/+5
|
* Clean up MRI 1.9 codeDouglas Eichelberger2023-01-012-11/+0
|
* Complete Style/SymbolArray todoDouglas Eichelberger2022-09-116-14/+14
|
* Short circuit eval regexes in finding module definitionDouglas Eichelberger2022-08-171-5/+6
|
* Merge pull request #2239 from andrehjr/drop-ruby-1-9-3André Luis Leal Cardoso Junior2022-06-113-25/+5
|\ | | | | Drop support for Ruby 1.9.x
| * Remove more 1.9 related workaroundsAndré Luis Leal Cardoso Junior2022-03-102-14/+1
| |
| * Support jruby >= 9.0.0André Luis Leal Cardoso Junior2022-03-101-1/+1
| |
| * Remove support for Ruby 1.9.3André Luis Leal Cardoso Junior2022-03-101-10/+3
| |
* | Merge pull request #2235 from pry/revert-2154-patch-1André Luis Leal Cardoso Junior2022-04-211-5/+5
|\ \ | | | | | | Revert "Escape non-printing characters"
| * | Revert "Escape non-printing characters"André Luis Leal Cardoso Junior2022-03-061-5/+5
| | |
* | | Merge pull request #2236 from andrehjr/enable-editor-code-flagsAndré Luis Leal Cardoso Junior2022-04-091-1/+3
|\ \ \ | | | | | | | | Configure `code` as a supported editor on Pry::Editor
| * | | Configure `code` as a supported editor on Pry::EditorAndré Luis Leal Cardoso Junior2022-03-061-1/+3
| |/ /
* | | Weird method location shouldn't match unknown locationJames Coleman2022-04-091-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Add ruby 3.0 to the windows test matrixAndré Luis Leal Cardoso Junior2022-03-091-1/+1
|/
* Update references from pryrepl.org to pry.github.ioupdate-pryrepl-org-refsAndré Luis Leal Cardoso Junior2022-01-092-2/+2
|
* Add backticks to error message to reduce ambiguitySteve Condylios2022-01-051-2/+2
|
* Update missing docs fail message to include directives for installation and ↵Steve Condylios2022-01-041-2/+3
| | | | loading.
* fix pry indent frozen error (#2136)T.Yasuma2021-10-111-1/+1
| | | | | | | | | * fix pry indent frozen error * fix generation of mutable strings * fix String.new with no argument * rubocop: fix offences of the Style/EmptyLiteral cop
* Fix typo in comment.Masato Yamashita2021-07-221-1/+1
|
* Return with an error message if pry is started inside signal handler (#2206)Barrett Ingram2021-07-031-0/+13
| | | | | | | | | | | | | | | | 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 (#2129)Armin2021-07-012-12/+9
| | | | | | | | * 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`).
* Merge pull request #2201 from pry/2199-ring-access-by-index-fixKyrylo Silin2021-06-281-1/+1
|\ | | | | ring: change guard priority so that the value at index can be read
| * ring: change guard priority so that the value at index can be readKyrylo Silin2021-06-281-1/+1
| | | | | | | | Fixes #2199 (`_out_` Ring is ill-addressible)
* | Restore `--no-history` CLI flag functionalityBrian Graham2021-06-141-1/+1
|/ | | | | | | | 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.
* Release v0.14.1Kyrylo Silin2021-04-121-1/+1
|
* Merge pull request #2180 from wenderjean/fix/deprecate-plugins-cli-optionKyrylo Silin2021-04-111-5/+2
|\ | | | | Deprecate the option "--plugins" on CLI
| * Deprecate the option "--plugins" on CLI considering PluginManager does not ↵Wender Freese2021-03-271-5/+2
| | | | | | | | exist anymore
* | helpers/documentation: don't colorize twiceKyrylo Silin2021-04-111-1/+2
| | | | | | | | | | | | | | 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.
* | Merge pull request #2158 from andrehjr/fix-color-off-overwriteKyrylo Silin2021-03-281-1/+1
|\ \ | | | | | | Fix breakage in output with colors disabled
| * | Make #strip_color only remove colors.André Luis Leal Cardoso Junior2020-10-051-1/+1
| | | | | | | | | | | | The previous implementation was removing more than that. When Pry.color = false, it was messing up the output of a few commands.
* | | Merge pull request #2154 from xjunior/patch-1Kyrylo Silin2021-03-281-5/+5
|\ \ \ | |_|/ |/| | Escape non-printing characters
| * | Escape non-printing charactersCarlos Palhares2020-09-061-5/+5
| |/
* | Release v0.14.0Kyrylo Silin2021-02-081-1/+1
| |
* | Merge pull request #2119 from mvz/issue-1241-remove-autoloading-of-pluginsKyrylo Silin2020-11-285-171/+5
|\ \ | | | | | | Remove autoloading of plugins
| * | Mark block arguments as unusedMatijs van Zuijlen2020-03-221-2/+2
| | |
| * | Remove plugin system in favor of regular requiresMatijs van Zuijlen2020-03-224-153/+2
| | |
| * | Remove should_load_plugins config optionMatijs van Zuijlen2020-03-223-16/+1
| | |
| * | Do not load plugins by defaultMatijs van Zuijlen2020-03-221-1/+1
| | |
* | | Merge pull request #2133 from tbrisker/patch-1Kyrylo Silin2020-11-282-1/+1
|\ \ \ | |_|/ |/| | Update `?` alias to use show-source
| * | Update `?` alias to use show-sourceTomer Brisker2020-05-032-1/+1
| | | | | | | | | | | | `show-doc` is deprecated in favor of `show-source -d`. Updating the `?` alias accordingly.
* | | do not undef =~ unless defined (#2149)卜部昌平2020-08-061-1/+1
|/ / | | | | | | 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.
* | Release v0.13.1Kyrylo Silin2020-04-121-1/+1
| |
* | Merge pull request #2122 from ahorek/frozen_pry_bugKyrylo Silin2020-04-121-3/+1
|\ \ | | | | | | pry-backtrace frozen bug
| * | pry-backtrace frozen bugpavel2020-03-251-3/+1
| |/
* | Merge pull request #2120 from barrettkingram/fix-help-command-listingKyrylo Silin2020-04-122-2/+2
|\ \ | | | | | | Improve appearance of help command listing
| * | Improve help listing for regex aliasesBarrett Ingram2020-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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[!?]+/`.
| * | Display Bang command as "!" instead of regex in help listingBarrett Ingram2020-03-221-1/+1
| |/
* | config: return `nil` on unknown option instead of raisingKyrylo Silin2020-04-121-3/+3
|/ | | | | | | | | | | | | | | | 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.
* Display all syntax error messages when catching SyntaxExceptionBarrett Ingram2020-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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