From: Yukihiro Matsumoto Date: 2008-03-04T18:17:33+09:00 Subject: Re: How should I document Kernel.exit? Hi, In message "Re: How should I document Kernel.exit?" on Tue, 4 Mar 2008 07:22:46 +0900, Dave Thomas writes: |In 1.8, the following code | | at_exit { puts "at_exit function" } | ObjectSpace.define_finalizer("string", lambda { puts "in finalizer" }) | exit | |output | at_exit function | in finalizer | |in 1.9, I just see "at_exit function" I get it. No bug in finalizer. In 1.9, lambda check number of arguments strictly (finalizer takes one argument, which is object_id of the target), so that you have to specify argument, e.g. at_exit { puts "at_exit function" } ObjectSpace.define_finalizer("string", lambda{|id| puts "in finalizer" }) exit matz.