diff options
Diffstat (limited to 'ext/tk/lib/tk/timer.rb')
-rw-r--r-- | ext/tk/lib/tk/timer.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/tk/lib/tk/timer.rb b/ext/tk/lib/tk/timer.rb index 3696de168b..fa0a582205 100644 --- a/ext/tk/lib/tk/timer.rb +++ b/ext/tk/lib/tk/timer.rb @@ -61,11 +61,16 @@ class TkTimer @in_callback = true begin @return_value = @current_proc.call(self) + rescue SystemExit + exit(0) + rescue Interrupt + exit!(1) rescue Exception => e if @cancel_on_exception && @cancel_on_exception.find{|exc| e.kind_of?(exc)} cancel @return_value = e + @in_callback = false return e else fail e |