Close tempfiles before editing [Fixes #575]
This commit is contained in:
parent
eb5b8eb8ee
commit
6a971f1060
|
@ -89,6 +89,7 @@ class Pry
|
||||||
f.puts(content)
|
f.puts(content)
|
||||||
f.flush
|
f.flush
|
||||||
reload = !opts.present?(:'no-reload') && !Pry.config.disable_auto_reload
|
reload = !opts.present?(:'no-reload') && !Pry.config.disable_auto_reload
|
||||||
|
f.close(false)
|
||||||
invoke_editor(f.path, line, reload)
|
invoke_editor(f.path, line, reload)
|
||||||
if reload
|
if reload
|
||||||
silence_warnings do
|
silence_warnings do
|
||||||
|
@ -209,6 +210,7 @@ class Pry
|
||||||
temp_file do |f|
|
temp_file do |f|
|
||||||
f.puts lines.join
|
f.puts lines.join
|
||||||
f.flush
|
f.flush
|
||||||
|
f.close(false)
|
||||||
invoke_editor(f.path, 0, true)
|
invoke_editor(f.path, 0, true)
|
||||||
|
|
||||||
if @method.alias?
|
if @method.alias?
|
||||||
|
|
Loading…
Reference in New Issue