ruby-changes:23069
From: nobu <ko1@a...>
Date: Fri, 23 Mar 2012 12:15:00 +0900 (JST)
Subject: [ruby-changes:23069] nobu:r35119 (trunk): * test/ruby/test_io.rb (try_fdopen): more GCable.
nobu 2012-03-23 12:14:49 +0900 (Fri, 23 Mar 2012) New Revision: 35119 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35119 Log: * test/ruby/test_io.rb (try_fdopen): more GCable. Modified files: trunk/test/ruby/test_io.rb Index: test/ruby/test_io.rb =================================================================== --- test/ruby/test_io.rb (revision 35118) +++ test/ruby/test_io.rb (revision 35119) @@ -1457,9 +1457,11 @@ def try_fdopen(fd, autoclose = true, level = 100) if level > 0 - f = try_fdopen(fd, autoclose, level - 1) - GC.start - f + begin + 1.times {return try_fdopen(fd, autoclose, level - 1)} + ensure + GC.start + end else WeakRef.new(IO.for_fd(fd, autoclose: autoclose)) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/