From: Motohiro KOSAKI Date: 2011-08-17T14:45:16+09:00 Subject: [ruby-core:39002] [Ruby 1.9 - Bug #5197] at_exit order has changed in 1.9.3dev32413 Issue #5197 has been updated by Motohiro KOSAKI. Hi Ryan, Can you please see following discussion at first? http://redmine.ruby-lang.org/issues/4400 And then, can you please explain why you are unhappy? Now at_exit() is consistent with JRuby and MacRuby. Then, fixing your unhappiness need to change three Ruby implementation at least. Thanks. ---------------------------------------- Bug #5197: at_exit order has changed in 1.9.3dev32413 http://redmine.ruby-lang.org/issues/5197 Author: Ryan Davis Status: Open Priority: Normal Assignee: Category: core Target version: 1.9.3 ruby -v: 1.9.3dev32413 I could have sworn I filed or mailed this before, but I can't find it. Sorry if this is a dupe. #!/usr/bin/ruby -w happy = false at_exit { happy = true } # test runner at_exit { at_exit { abort "not happy!" unless happy } } # after test hook # multiruby produces: # VERSION = mri_trunk # CMD = ~/.multiruby/install/mri_trunk/bin/ruby -v -Ilib bug4.rb # # ruby 1.9.3dev (2011-07-05 trunk 32413) [x86_64-darwin10.8.0] # not happy! # # RESULT = 256 # # VERSION = 1.8.7-p330 # CMD = ~/.multiruby/install/1.8.7-p330/bin/ruby -v -Ilib bug4.rb # # ruby 1.8.7 (2010-12-23 patchlevel 330) [i686-darwin10.5.0] # # RESULT = 0 # # VERSION = 1.9.2-p136 # CMD = ~/.multiruby/install/1.9.2-p136/bin/ruby -v -Ilib bug4.rb # # ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.5.0] # # RESULT = 0 # # TOTAL RESULT = 1 failures out of 3 -- http://redmine.ruby-lang.org