Class: Ruined::Thread
- Inherits:
-
Object
- Object
- Ruined::Thread
- Defined in:
- lib/ruined/ruinmain.rb
Class Method Summary collapse
Class Method Details
._original_start ⇒ Object
22 |
# File 'lib/ruined/ruinmain.rb', line 22 alias :_original_start :start |
.start(&proc) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/ruined/ruinmain.rb', line 23 def start(&proc) webrick = caller.first.include?('webrick') $stderr.puts "caller=#{caller[2]}, webrick=#{webrick}" $stderr.flush _original_start do Ruined.add_unbreakable(Thread.current) if webrick begin proc.call ensure Ruined.remove_unbreakable(Thread.current) if webrick end end end |