mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
version 0.6.8.1 - fixed rubinius raising when command line pry was invoked
* added :__script__ test to hooks too * raise was due to top-level rubinius __method__ returning :__script__ and not simply returning nil (like MRI/JRUBY) * Fix was to include :__script__ in the test. * also slightly improved working in README.markdown
This commit is contained in:
parent
4b9198d03c
commit
439e4ccbf4
4 changed files with 6 additions and 4 deletions
|
@ -164,7 +164,7 @@ end.
|
|||
|
||||
* Pry can be invoked at any time and on any object in the running program.
|
||||
* Pry sessions can nest arbitrarily deeply -- to go back one level of nesting type 'exit' or 'quit' or 'back'
|
||||
* Pry comes with syntax highlighting on by default just use the `toggle-color` command to use it.
|
||||
* Pry comes with syntax highlighting on by default just use the `toggle-color` command to turn it on and off.
|
||||
* Use `_` to recover last result.
|
||||
* Use `_pry_` to reference the Pry instance managing the current session.
|
||||
* Pry supports tab completion.
|
||||
|
|
|
@ -11,7 +11,9 @@ class Pry
|
|||
# We make this a lambda to avoid documenting it
|
||||
meth_name_from_binding = lambda do |b|
|
||||
meth_name = b.eval('__method__')
|
||||
if [nil, :__binding__, :__binding_impl__].include?(meth_name)
|
||||
|
||||
# :__script__ for rubinius
|
||||
if [:__script__, nil, :__binding__, :__binding_impl__].include?(meth_name)
|
||||
nil
|
||||
else
|
||||
meth_name
|
||||
|
|
|
@ -9,7 +9,7 @@ class Pry
|
|||
# ensure we're actually in a method
|
||||
meth_name = target.eval('__method__')
|
||||
file = target.eval('__FILE__')
|
||||
if ![nil, :__binding__, :__binding_impl__].include?(meth_name) && file !~ /(\(.*\))|<.*>/
|
||||
if ![:__script__, nil, :__binding__, :__binding_impl__].include?(meth_name) && file !~ /(\(.*\))|<.*>/
|
||||
Pry.run_command "whereami", :output => out, :show_output => true, :context => target, :commands => Pry::Commands
|
||||
end
|
||||
end,
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
class Pry
|
||||
VERSION = "0.6.8"
|
||||
VERSION = "0.6.8.1"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue