File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -192,17 +192,19 @@ def run(&block)
192
192
193
193
# If a block was passed in, pass the line to it. If it returns true,
194
194
# break out of the shell loop.
195
- if ( block )
196
- break if ( line == nil or block . call ( line ) )
197
- elsif ( input . eof? or line == nil )
198
- # If you have sessions active, this will give you a shot to exit gracefully
199
- # If you really are ambitious, 2 eofs will kick this out
195
+ if block
196
+ break if line == nil || block . call ( line )
197
+
198
+ # If you have sessions active, this will give you a shot to exit
199
+ # gracefully. If you really are ambitious, 2 eofs will kick this out
200
+ elsif input . eof? || line == nil
200
201
self . stop_count += 1
201
- next if ( self . stop_count > 1 )
202
+ next if self . stop_count > 1
202
203
run_single ( "quit" )
203
- else
204
+
204
205
# Otherwise, call what should be an overriden instance method to
205
206
# process the line.
207
+ else
206
208
ret = run_single ( line )
207
209
# don't bother saving lines that couldn't be found as a
208
210
# command, create the file if it doesn't exist
You can’t perform that action at this time.
0 commit comments