summaryrefslogtreecommitdiff
path: root/lib/method_source/code_helpers.rb
Commit message (Collapse)AuthorAgeFilesLines
* Handle new message for unterminated lists on MRI 2.7Jean Boussier2019-10-261-1/+1
| | | | | | | | | | | | | | The error message for `issue = %W/` changed, before: ``` (eval):2: syntax error, unexpected tSTRING_END, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or ' ' ``` After: ``` ((eval):2: unterminated list meets end of file) ```
* Revert "method_source: fix broken Procs on JRuby 9.2.0.0"Kyrylo Silin2018-11-121-23/+0
| | | | | | | Fixes #52 (Revert the JRuby 9.2.0.0 source_location hack once the newest version is out) This reverts commit 20fb1efde4530c78f7627d8b5b4e0b3f43cf821d.
* method_source: fix broken Procs on JRuby 9.2.0.0Kyrylo Silin2018-11-021-0/+23
| | | | | | | | | | | | | | | Fixes https://github.com/pry/pry/issues/1804 (JRuby 9.2.0.0 breaks `source_location` and therefore our test suite) JRuby 9.2.0.0 fails to fetch source code for procs because of the bug: https://github.com/jruby/jruby/pull/5262 The problem is that source_location is reported at the end of the proc, instead of the beginning. The way I fix it is rather dumb (rewinding back and checking if it's complete expression) but it's isolated only to 9.2.0.0 and likely won't be needed when another JRuby is released. However, so far it's the latest release.
* Integer Unification for Ruby 2.4.0+Koichi ITO2017-01-111-4/+4
|
* Be more careful about separating out the rbx-only regexesRyan Fitzgerald2013-07-271-6/+6
|
* Remove colons from rbx regexps, separate from generic onesRyan Fitzgerald2013-07-271-4/+19
|
* Fix 'assigned but unused variable' warningJack Nagel2013-04-061-1/+1
|
* Basic ruby-2.0 supportConrad Irwin2012-09-111-1/+1
|
* Allow embedded documents in incomplete expressions [Fixes pry#622]Conrad Irwin2012-07-021-0/+2
| | | | Also import complete_expression? tests from Pry.
* properly documented :consume parameterJohn Mair2012-07-021-5/+11
|
* define a consume parameter for expression_at and extract_first_expressionJohn Mair2012-06-291-5/+11
| | | | | | When consume is > 0 it prefills the expression buffer with `consume` lines of input. This enables you to rapidly check a large chunk of code for validity as you skip over the initial portion you know is valid without having to perform an expensive eval() on each line.
* Import some CodeHelpers from Pry.Conrad Irwin2012-06-031-0/+125
The hope is that they can live in this gem permanently, and Pry can also include MethodSource::CodeHelpers in the relevant places.