We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae7415c commit 5f63d47Copy full SHA for 5f63d47
ext/socket/lib/socket.rb
@@ -1569,13 +1569,16 @@ def self.unix_server_socket(path)
1569
end
1570
1571
1572
- class << self
1573
- private
1574
-
1575
- def unix_socket_abstract_name?(path)
1576
- /linux/ =~ RUBY_PLATFORM && /\A(\0|\z)/ =~ path
+ if RUBY_PLATFORM.include?("linux")
+ def self.unix_socket_abstract_name?(path)
+ path.empty? or path.start_with?("\0")
+ end
+ else
1577
1578
+ false
1579
1580
1581
+ private_class_method :unix_socket_abstract_name?
1582
1583
# creates a UNIX socket server on _path_.
1584
# It calls the block for each socket accepted.
0 commit comments