diff options
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
| -rw-r--r-- | test/ruby/test_rubyoptions.rb | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 459e316016..82ff0258e7 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -435,16 +435,20 @@ class TestRubyOptions < Test::Unit::TestCase 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| |
