requireing tempfile now in introspection.rb (for edit -t); also made a couple of minor changes

This commit is contained in:
John Mair 2011-07-27 23:21:53 +12:00
parent fb5d3cbbfb
commit d5ffd46811
1 changed files with 7 additions and 5 deletions

View File

@ -1,3 +1,5 @@
require 'tempfile'
class Pry
module DefaultCommands
@ -146,14 +148,14 @@ class Pry
invoke_editor(file_name, line)
set_file_and_dir_locals(file_name)
if should_reload
silence_warnings do
context.eval(File.read(file_name))
end
elsif opts[:p]
if opts[:p]
silence_warnings do
Pry.active_instance.input = StringIO.new(File.readlines(file_name).join)
end
elsif should_reload
silence_warnings do
context.eval(File.read(file_name))
end
end
end