1
0
Fork 0
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:
yui-knk 2014-01-29 00:05:48 +09:00
parent 994f1974da
commit ed26866c89

View file

@ -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