Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

wait for in_loop? merging into ripl, so that call before_loop if it's:

not in_loop? This would fix the issue for running Ripl.edit in a file
  • Loading branch information...
commit b7490b41f2ef28e64e5779f8d4be3a3dd0d0ec83 1 parent 022bf58
@godfat authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/ripl/rc/edit.rb
View
5 lib/ripl/rc/edit.rb
@@ -14,8 +14,9 @@ def edit
system("$EDITOR #{file.path}")
- ((Ripl.config[:rc_shells] ||= []).last || Ripl.shell).loop_eval(
- Ripl.config[:rc_edit] = File.read(file.path))
+ shell = (Ripl.config[:rc_shells] ||= []).last || Ripl.shell
+ shell.before_loop unless shell.in_loop?
+ shell.loop_eval(Ripl.config[:rc_edit] = File.read(file.path))
ensure
file.close
file.unlink
Please sign in to comment.
Something went wrong with that request. Please try again.