From f091284a75b52b84dbe602d85345bae9bcfc2422 Mon Sep 17 00:00:00 2001 From: jj Date: Sun, 25 Nov 2012 17:29:03 +0100 Subject: [PATCH] ruby: avoid crash on ArgumentError in onupdate --- plugins/ruby/ruby.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ruby/ruby.rb b/plugins/ruby/ruby.rb index 4fcb5543a..b7f7590e9 100644 --- a/plugins/ruby/ruby.rb +++ b/plugins/ruby/ruby.rb @@ -47,7 +47,7 @@ module DFHack # t0 = Time.now @callback.call # dt = Time.now - t0 ; puts "rb cb #@description took #{'%.02f' % dt}s" if dt > 0.1 - rescue + rescue Exception df.onupdate_unregister self puts_err "onupdate #@description unregistered: #$!", $!.backtrace end