1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
Commit graph

8 commits

Author SHA1 Message Date
Yorick Peterse
3fa74ea862 Manually merged branch "issue/601".
The commits in this branch would conflict with the current ones in the master
branch. I've modified the code of pry/completion.rb so that instead of escaping
*all* input it will only escape it when this hasn't already been done so.

This fixes #601.

Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
2012-06-19 15:47:52 +02:00
Yorick Peterse
d53eb0921d Fixed the completion test for Ruby 1.8.
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
2012-06-19 13:09:55 +02:00
Yorick Peterse
a36322a6bc Completion for instance and class variables.
Pry is now able to complete variable names for instance and class variables, as
well as being able to complete methods and the like on these variables.

Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
2012-06-19 12:32:03 +02:00
Yorick Peterse
ea016d8e4c Escape user input before completing it.
User input should be escaped using Regexp.escape() before trying to figure out
what data to use for the Readline completion system. Not escaping this input
would cause Pry to fail for input such as `[10, 20].map(&:class)`.

This problem was caused due to lib/completion.rb converting the input (in this
case it would be ":class)") to a Regexp object. Because this, when converted to
a Regexp object, is invalid it would cause Pry to throw a RegexpError error and
bail out.

See #601 for more information.

Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
2012-06-19 11:44:34 +02:00
Conrad Irwin
30e1e0941e Use Helpers::BaseHelpers.<foo>? MOAR 2011-12-27 23:16:53 +00:00
John Mair
0eca0f1aa9 updated tests for new _pry_ parameter being passed to before_session hook 2011-09-08 03:28:00 +12:00
John Mair
e589710cc1 JRuby finally supported, passing 100% of tests - requires updated method_source gem (version 0.6.5). 2011-09-07 05:20:04 +12:00
Conrad Irwin
fe911c6740 Don't crash if I have a badly behaved module.
The completion code was assuming that all modules would have names that
were strings, this is not always the case.
2011-08-16 21:53:20 -07:00