End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
ACL::ACLEntry.new
new(str)
lib/drb/acl.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/drb/acl.rb, line 56
def initialize(str)
if str == '*' or str == 'all'
@pat = [:all]
elsif str.include?('*')
@pat = [:name, dot_pat(str)]
else
begin
@pat = [:ip, IPAddr.new(str)]
rescue IPAddr::InvalidPrefixError
# In this case, `str` shouldn't be a host name pattern
# because it contains a slash.
raise
rescue ArgumentError
@pat = [:name, dot_pat(str)]
end
end
end
Creates a new entry using str.
str may be “*” or “all” to match any address, an IP address string to match a specific address, an IP address mask per IPAddr, or one containing “*” to match part of an IPv4 address.
IPAddr::InvalidPrefixError may be raised when an IP network address with an invalid netmask/prefix is given.