1
0
Fork 0
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:
Mon ouïe 2011-05-15 12:08:59 +02:00
parent e0224000db
commit a38cb72990

View file

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