requireing tempfile now in introspection.rb (for edit -t); also made a couple of minor changes
This commit is contained in:
parent
fb5d3cbbfb
commit
d5ffd46811
|
@ -1,3 +1,5 @@
|
||||||
|
require 'tempfile'
|
||||||
|
|
||||||
class Pry
|
class Pry
|
||||||
module DefaultCommands
|
module DefaultCommands
|
||||||
|
|
||||||
|
@ -146,14 +148,14 @@ class Pry
|
||||||
invoke_editor(file_name, line)
|
invoke_editor(file_name, line)
|
||||||
set_file_and_dir_locals(file_name)
|
set_file_and_dir_locals(file_name)
|
||||||
|
|
||||||
if should_reload
|
if opts[:p]
|
||||||
silence_warnings do
|
|
||||||
context.eval(File.read(file_name))
|
|
||||||
end
|
|
||||||
elsif opts[:p]
|
|
||||||
silence_warnings do
|
silence_warnings do
|
||||||
Pry.active_instance.input = StringIO.new(File.readlines(file_name).join)
|
Pry.active_instance.input = StringIO.new(File.readlines(file_name).join)
|
||||||
end
|
end
|
||||||
|
elsif should_reload
|
||||||
|
silence_warnings do
|
||||||
|
context.eval(File.read(file_name))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue