ruby-changes:35272
From: akr <ko1@a...>
Date: Tue, 2 Sep 2014 22:45:29 +0900 (JST)
Subject: [ruby-changes:35272] akr:r47354 (trunk): * test/ruby/test_io.rb (test_new_with_block): Set autoclose to avoid EBADF.
akr 2014-09-02 22:45:20 +0900 (Tue, 02 Sep 2014) New Revision: 47354 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47354 Log: * test/ruby/test_io.rb (test_new_with_block): Set autoclose to avoid EBADF. Modified files: trunk/ChangeLog trunk/test/ruby/test_io.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 47353) +++ ChangeLog (revision 47354) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Sep 2 22:43:52 2014 Tanaka Akira <akr@f...> + + * test/ruby/test_io.rb (test_new_with_block): Set autoclose to avoid + EBADF. + Tue Sep 2 22:01:51 2014 Kouhei Sutou <kou@c...> * Makefile.in (update-coverage): Remove a never executed line. Index: test/ruby/test_io.rb =================================================================== --- test/ruby/test_io.rb (revision 47353) +++ test/ruby/test_io.rb (revision 47354) @@ -2282,11 +2282,15 @@ End https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L2282 end def test_new_with_block - assert_in_out_err([], "r, w = IO.pipe; IO.new(r.fileno) {}", [], /^.+$/) + assert_in_out_err([], "r, w = IO.pipe; r.autoclose=false; IO.new(r.fileno) {}.close", [], /^.+$/) n = "IO\u{5165 51fa 529b}" c = eval("class #{n} < IO; self; end") IO.pipe do |r, w| - assert_warning(/#{n}/) {c.new(r.fileno) {}} + assert_warning(/#{n}/) { + r.autoclose=false + io = c.new(r.fileno) {} + io.close + } end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/