mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Pass a real binding to :when_started hook
This commit is contained in:
parent
47ad5fd53f
commit
f02ba7615b
1 changed files with 5 additions and 2 deletions
|
@ -145,10 +145,13 @@ class Pry
|
|||
pry_instance.backtrace = caller
|
||||
|
||||
# if Pry was started via binding.pry, elide that from the backtrace.
|
||||
pry_instance.backtrace.shift if pry_instance.backtrace.first =~ /pry.*core_extensions.*pry/
|
||||
if pry_instance.backtrace.first =~ /pry.*core_extensions.*pry/
|
||||
pry_instance.backtrace.shift
|
||||
end
|
||||
|
||||
# yield the binding_stack to the hook for modification
|
||||
pry_instance.exec_hook(:when_started, target, options, pry_instance)
|
||||
pry_instance.exec_hook(:when_started,
|
||||
Pry.binding_for(target), options, pry_instance)
|
||||
|
||||
# Clear the line before starting Pry. This fixes the issue discussed here:
|
||||
# https://github.com/pry/pry/issues/566
|
||||
|
|
Loading…
Reference in a new issue