mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Fix watch_expression to access correct hooks
Now by refactoring config, Pry.config and @pry.config have different hooks. So to access correct pry config hooks, fix Pry::Command::WatchExpression.add_hook.
This commit is contained in:
parent
994f1974da
commit
ed26866c89
1 changed files with 2 additions and 2 deletions
|
@ -82,8 +82,8 @@ class Pry
|
|||
|
||||
def add_hook
|
||||
hook = [:after_eval, :watch_expression]
|
||||
unless Pry.hooks.hook_exists?(*hook)
|
||||
Pry.hooks.add_hook(*hook) do |_, _pry_|
|
||||
unless _pry_.hooks.hook_exists?(*hook)
|
||||
_pry_.hooks.add_hook(*hook) do |_, _pry_|
|
||||
eval_and_print_changed _pry_.output
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue