diff --git a/spec/ruby/core/file/fixtures/file_types.rb b/spec/ruby/core/file/fixtures/file_types.rb index a36817fb4e..1dd0752f73 100644 --- a/spec/ruby/core/file/fixtures/file_types.rb +++ b/spec/ruby/core/file/fixtures/file_types.rb @@ -55,7 +55,12 @@ module FileSpecs require 'socket' name = tmp("ftype_socket.socket") rm_r name - socket = UNIXServer.new name + begin + socket = UNIXServer.new name + rescue ArgumentError => error + error.message.should =~ /too long/ + return + end begin yield name ensure