summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_process.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index d6a486c5c0..0df1491b68 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -1234,11 +1234,15 @@ class TestProcess < Test::Unit::TestCase
def test_too_long_path
bug4314 = '[ruby-core:34842]'
- assert_raise(Errno::ENOENT, bug4314) {Process.spawn("a" * 10_000_000)}
+ exs = [Errno::ENOENT]
+ exs << Errno::E2BIG if defined?(Errno::E2BIG)
+ assert_raise(*exs, bug4314) {Process.spawn("a" * 10_000_000)}
end
def test_too_long_path2
bug4315 = '[ruby-core:34833]'
- assert_raise(Errno::ENOENT, bug4315) {Process.spawn('"a"|'*10_000_000)}
+ exs = [Errno::ENOENT]
+ exs << Errno::E2BIG if defined?(Errno::E2BIG)
+ assert_raise(*exs, bug4315) {Process.spawn('"a"|'*10_000_000)}
end
end