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

Let pry_eval take a target as the first param

This commit is contained in:
Ryan Fitzgerald 2012-08-19 12:39:54 -07:00
parent f4c3ada10a
commit e28bf4149c

View file

@ -208,7 +208,13 @@ def pry_tester(context = TOPLEVEL_BINDING, &block)
end
def pry_eval(*eval_strs)
pry_tester.eval(*eval_strs)
if eval_strs.first.is_a? String
binding = TOPLEVEL_BINDING
else
binding = Pry.binding_for(eval_strs.shift)
end
pry_tester(binding).eval(*eval_strs)
end
class PryTester