mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Changed the place where input_array was modified
This commit is contained in:
parent
e0224000db
commit
a38cb72990
1 changed files with 5 additions and 2 deletions
|
@ -169,7 +169,11 @@ class Pry
|
||||||
# Do not want __FILE__, __LINE__ here because we need to distinguish
|
# Do not want __FILE__, __LINE__ here because we need to distinguish
|
||||||
# (eval) methods for show-method and friends.
|
# (eval) methods for show-method and friends.
|
||||||
# This also sets the `_` local for the session.
|
# This also sets the `_` local for the session.
|
||||||
set_last_result(target.eval(r(target)), target)
|
code = r(target)
|
||||||
|
res = set_last_result(target.eval(code), target)
|
||||||
|
|
||||||
|
@input_array << code
|
||||||
|
res
|
||||||
rescue SystemExit => e
|
rescue SystemExit => e
|
||||||
exit
|
exit
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
|
@ -199,7 +203,6 @@ class Pry
|
||||||
|
|
||||||
@suppress_output = true if eval_string =~ /;\Z/ || null_input?(val)
|
@suppress_output = true if eval_string =~ /;\Z/ || null_input?(val)
|
||||||
|
|
||||||
@input_array << eval_string
|
|
||||||
eval_string
|
eval_string
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue