lib/rib/shell.rb in rib-0.1.0 vs lib/rib/shell.rb in rib-0.9.0
- old
+ new
@@ -11,25 +11,28 @@
end
attr_reader :config
def initialize(config={})
self.config = {
- :name => 'rib' ,
:result_prompt => '=> ' ,
:prompt => '>> ' ,
:binding => TOPLEVEL_BINDING ,
:exit => [nil, 'exit', 'quit'] ,
:line => 1
}.merge(config)
+ @running = false
end
# Loops shell until user exits
def loop
before_loop
@running = true
in_loop
self
+ rescue Exception => e
+ Rib.warn("Error while running loop:\n #{format_error(e)}")
+ raise
ensure
@running = false
after_loop
end
@@ -37,7 +40,6 @@
!!@running
end
protected
attr_writer :config
- attr_accessor :error_raised
end