ruby-changes:17361
From: shyouhei <ko1@a...>
Date: Wed, 29 Sep 2010 21:10:22 +0900 (JST)
Subject: [ruby-changes:17361] Ruby:r29366 (trunk): * test/ruby/test_rubyoptions.rb (TestRubyOptions::test_script_from_stdin):
shyouhei 2010-09-29 21:06:42 +0900 (Wed, 29 Sep 2010) New Revision: 29366 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29366 Log: * test/ruby/test_rubyoptions.rb (TestRubyOptions::test_script_from_stdin): As usual, PTY is not always available. Modified files: trunk/ChangeLog trunk/test/ruby/test_rubyoptions.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 29365) +++ ChangeLog (revision 29366) @@ -1,3 +1,8 @@ +Wed Sep 29 21:04:05 2010 URABE Shyouhei <shyouhei@r...> + + * test/ruby/test_rubyoptions.rb (TestRubyOptions::test_script_from_stdin): + As usual, PTY is not always available. + Wed Sep 29 18:38:14 2010 Nobuyoshi Nakada <nobu@r...> * tool/config.sub (x64): regularize only for pc vendor, and strip Index: test/ruby/test_rubyoptions.rb =================================================================== --- test/ruby/test_rubyoptions.rb (revision 29365) +++ test/ruby/test_rubyoptions.rb (revision 29366) @@ -435,16 +435,20 @@ require 'timeout' result = nil IO.pipe {|r, w| - PTY.open {|m, s| - m.echo = false - m.print("\C-d") - pid = spawn(EnvUtil.rubybin, :in => s, :out => w) - w.close - assert_nothing_raised('[ruby-dev:37798]') do - result = Timeout.timeout(3) {r.read} - end - Process.wait pid - } + begin + PTY.open {|m, s| + m.echo = false + m.print("\C-d") + pid = spawn(EnvUtil.rubybin, :in => s, :out => w) + w.close + assert_nothing_raised('[ruby-dev:37798]') do + result = Timeout.timeout(3) {r.read} + end + Process.wait pid + } + rescue RuntimeError + skip $! + end } assert_equal("", result, '[ruby-dev:37798]') IO.pipe {|r, w| -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/