lib/rib/runner.rb in rib-1.0.3 vs lib/rib/runner.rb in rib-1.0.4

- old
+ new

@@ -71,10 +71,19 @@ return if @running_commands.pop != 'rib' # by comming to this line, it means now we're running Rib main loop, # not any other Rib command Rib.warn("Unused arguments: #{unused.inspect}") unless unused.empty? require 'rib/core' if Rib.config.delete(:mimic_irb) + loop + end + + def loop Rib.shell.loop + rescue Exception + Rib.warn("Relaunching a new shell...") + Rib.shells.pop + Rib.shells << Rib::Shell.new(Rib.config) + retry end def parse argv unused = [] until argv.empty?