Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../opt/alt/ruby22/lib64/ruby/2.2.0
File: resolv.rb
require 'socket'
[0] Fix | Delete
require 'timeout'
[1] Fix | Delete
require 'thread'
[2] Fix | Delete
[3] Fix | Delete
begin
[4] Fix | Delete
require 'securerandom'
[5] Fix | Delete
rescue LoadError
[6] Fix | Delete
end
[7] Fix | Delete
[8] Fix | Delete
# Resolv is a thread-aware DNS resolver library written in Ruby. Resolv can
[9] Fix | Delete
# handle multiple DNS requests concurrently without blocking the entire Ruby
[10] Fix | Delete
# interpreter.
[11] Fix | Delete
#
[12] Fix | Delete
# See also resolv-replace.rb to replace the libc resolver with Resolv.
[13] Fix | Delete
#
[14] Fix | Delete
# Resolv can look up various DNS resources using the DNS module directly.
[15] Fix | Delete
#
[16] Fix | Delete
# Examples:
[17] Fix | Delete
#
[18] Fix | Delete
# p Resolv.getaddress "www.ruby-lang.org"
[19] Fix | Delete
# p Resolv.getname "210.251.121.214"
[20] Fix | Delete
#
[21] Fix | Delete
# Resolv::DNS.open do |dns|
[22] Fix | Delete
# ress = dns.getresources "www.ruby-lang.org", Resolv::DNS::Resource::IN::A
[23] Fix | Delete
# p ress.map { |r| r.address }
[24] Fix | Delete
# ress = dns.getresources "ruby-lang.org", Resolv::DNS::Resource::IN::MX
[25] Fix | Delete
# p ress.map { |r| [r.exchange.to_s, r.preference] }
[26] Fix | Delete
# end
[27] Fix | Delete
#
[28] Fix | Delete
#
[29] Fix | Delete
# == Bugs
[30] Fix | Delete
#
[31] Fix | Delete
# * NIS is not supported.
[32] Fix | Delete
# * /etc/nsswitch.conf is not supported.
[33] Fix | Delete
[34] Fix | Delete
class Resolv
[35] Fix | Delete
[36] Fix | Delete
##
[37] Fix | Delete
# Looks up the first IP address for +name+.
[38] Fix | Delete
[39] Fix | Delete
def self.getaddress(name)
[40] Fix | Delete
DefaultResolver.getaddress(name)
[41] Fix | Delete
end
[42] Fix | Delete
[43] Fix | Delete
##
[44] Fix | Delete
# Looks up all IP address for +name+.
[45] Fix | Delete
[46] Fix | Delete
def self.getaddresses(name)
[47] Fix | Delete
DefaultResolver.getaddresses(name)
[48] Fix | Delete
end
[49] Fix | Delete
[50] Fix | Delete
##
[51] Fix | Delete
# Iterates over all IP addresses for +name+.
[52] Fix | Delete
[53] Fix | Delete
def self.each_address(name, &block)
[54] Fix | Delete
DefaultResolver.each_address(name, &block)
[55] Fix | Delete
end
[56] Fix | Delete
[57] Fix | Delete
##
[58] Fix | Delete
# Looks up the hostname of +address+.
[59] Fix | Delete
[60] Fix | Delete
def self.getname(address)
[61] Fix | Delete
DefaultResolver.getname(address)
[62] Fix | Delete
end
[63] Fix | Delete
[64] Fix | Delete
##
[65] Fix | Delete
# Looks up all hostnames for +address+.
[66] Fix | Delete
[67] Fix | Delete
def self.getnames(address)
[68] Fix | Delete
DefaultResolver.getnames(address)
[69] Fix | Delete
end
[70] Fix | Delete
[71] Fix | Delete
##
[72] Fix | Delete
# Iterates over all hostnames for +address+.
[73] Fix | Delete
[74] Fix | Delete
def self.each_name(address, &proc)
[75] Fix | Delete
DefaultResolver.each_name(address, &proc)
[76] Fix | Delete
end
[77] Fix | Delete
[78] Fix | Delete
##
[79] Fix | Delete
# Creates a new Resolv using +resolvers+.
[80] Fix | Delete
[81] Fix | Delete
def initialize(resolvers=[Hosts.new, DNS.new])
[82] Fix | Delete
@resolvers = resolvers
[83] Fix | Delete
end
[84] Fix | Delete
[85] Fix | Delete
##
[86] Fix | Delete
# Looks up the first IP address for +name+.
[87] Fix | Delete
[88] Fix | Delete
def getaddress(name)
[89] Fix | Delete
each_address(name) {|address| return address}
[90] Fix | Delete
raise ResolvError.new("no address for #{name}")
[91] Fix | Delete
end
[92] Fix | Delete
[93] Fix | Delete
##
[94] Fix | Delete
# Looks up all IP address for +name+.
[95] Fix | Delete
[96] Fix | Delete
def getaddresses(name)
[97] Fix | Delete
ret = []
[98] Fix | Delete
each_address(name) {|address| ret << address}
[99] Fix | Delete
return ret
[100] Fix | Delete
end
[101] Fix | Delete
[102] Fix | Delete
##
[103] Fix | Delete
# Iterates over all IP addresses for +name+.
[104] Fix | Delete
[105] Fix | Delete
def each_address(name)
[106] Fix | Delete
if AddressRegex =~ name
[107] Fix | Delete
yield name
[108] Fix | Delete
return
[109] Fix | Delete
end
[110] Fix | Delete
yielded = false
[111] Fix | Delete
@resolvers.each {|r|
[112] Fix | Delete
r.each_address(name) {|address|
[113] Fix | Delete
yield address.to_s
[114] Fix | Delete
yielded = true
[115] Fix | Delete
}
[116] Fix | Delete
return if yielded
[117] Fix | Delete
}
[118] Fix | Delete
end
[119] Fix | Delete
[120] Fix | Delete
##
[121] Fix | Delete
# Looks up the hostname of +address+.
[122] Fix | Delete
[123] Fix | Delete
def getname(address)
[124] Fix | Delete
each_name(address) {|name| return name}
[125] Fix | Delete
raise ResolvError.new("no name for #{address}")
[126] Fix | Delete
end
[127] Fix | Delete
[128] Fix | Delete
##
[129] Fix | Delete
# Looks up all hostnames for +address+.
[130] Fix | Delete
[131] Fix | Delete
def getnames(address)
[132] Fix | Delete
ret = []
[133] Fix | Delete
each_name(address) {|name| ret << name}
[134] Fix | Delete
return ret
[135] Fix | Delete
end
[136] Fix | Delete
[137] Fix | Delete
##
[138] Fix | Delete
# Iterates over all hostnames for +address+.
[139] Fix | Delete
[140] Fix | Delete
def each_name(address)
[141] Fix | Delete
yielded = false
[142] Fix | Delete
@resolvers.each {|r|
[143] Fix | Delete
r.each_name(address) {|name|
[144] Fix | Delete
yield name.to_s
[145] Fix | Delete
yielded = true
[146] Fix | Delete
}
[147] Fix | Delete
return if yielded
[148] Fix | Delete
}
[149] Fix | Delete
end
[150] Fix | Delete
[151] Fix | Delete
##
[152] Fix | Delete
# Indicates a failure to resolve a name or address.
[153] Fix | Delete
[154] Fix | Delete
class ResolvError < StandardError; end
[155] Fix | Delete
[156] Fix | Delete
##
[157] Fix | Delete
# Indicates a timeout resolving a name or address.
[158] Fix | Delete
[159] Fix | Delete
class ResolvTimeout < Timeout::Error; end
[160] Fix | Delete
[161] Fix | Delete
##
[162] Fix | Delete
# Resolv::Hosts is a hostname resolver that uses the system hosts file.
[163] Fix | Delete
[164] Fix | Delete
class Hosts
[165] Fix | Delete
begin
[166] Fix | Delete
raise LoadError unless /mswin|mingw|cygwin/ =~ RUBY_PLATFORM
[167] Fix | Delete
require 'win32/resolv'
[168] Fix | Delete
DefaultFileName = Win32::Resolv.get_hosts_path
[169] Fix | Delete
rescue LoadError
[170] Fix | Delete
DefaultFileName = '/etc/hosts'
[171] Fix | Delete
end
[172] Fix | Delete
[173] Fix | Delete
##
[174] Fix | Delete
# Creates a new Resolv::Hosts, using +filename+ for its data source.
[175] Fix | Delete
[176] Fix | Delete
def initialize(filename = DefaultFileName)
[177] Fix | Delete
@filename = filename
[178] Fix | Delete
@mutex = Mutex.new
[179] Fix | Delete
@initialized = nil
[180] Fix | Delete
end
[181] Fix | Delete
[182] Fix | Delete
def lazy_initialize # :nodoc:
[183] Fix | Delete
@mutex.synchronize {
[184] Fix | Delete
unless @initialized
[185] Fix | Delete
@name2addr = {}
[186] Fix | Delete
@addr2name = {}
[187] Fix | Delete
open(@filename, 'rb') {|f|
[188] Fix | Delete
f.each {|line|
[189] Fix | Delete
line.sub!(/#.*/, '')
[190] Fix | Delete
addr, hostname, *aliases = line.split(/\s+/)
[191] Fix | Delete
next unless addr
[192] Fix | Delete
addr.untaint
[193] Fix | Delete
hostname.untaint
[194] Fix | Delete
@addr2name[addr] = [] unless @addr2name.include? addr
[195] Fix | Delete
@addr2name[addr] << hostname
[196] Fix | Delete
@addr2name[addr] += aliases
[197] Fix | Delete
@name2addr[hostname] = [] unless @name2addr.include? hostname
[198] Fix | Delete
@name2addr[hostname] << addr
[199] Fix | Delete
aliases.each {|n|
[200] Fix | Delete
n.untaint
[201] Fix | Delete
@name2addr[n] = [] unless @name2addr.include? n
[202] Fix | Delete
@name2addr[n] << addr
[203] Fix | Delete
}
[204] Fix | Delete
}
[205] Fix | Delete
}
[206] Fix | Delete
@name2addr.each {|name, arr| arr.reverse!}
[207] Fix | Delete
@initialized = true
[208] Fix | Delete
end
[209] Fix | Delete
}
[210] Fix | Delete
self
[211] Fix | Delete
end
[212] Fix | Delete
[213] Fix | Delete
##
[214] Fix | Delete
# Gets the IP address of +name+ from the hosts file.
[215] Fix | Delete
[216] Fix | Delete
def getaddress(name)
[217] Fix | Delete
each_address(name) {|address| return address}
[218] Fix | Delete
raise ResolvError.new("#{@filename} has no name: #{name}")
[219] Fix | Delete
end
[220] Fix | Delete
[221] Fix | Delete
##
[222] Fix | Delete
# Gets all IP addresses for +name+ from the hosts file.
[223] Fix | Delete
[224] Fix | Delete
def getaddresses(name)
[225] Fix | Delete
ret = []
[226] Fix | Delete
each_address(name) {|address| ret << address}
[227] Fix | Delete
return ret
[228] Fix | Delete
end
[229] Fix | Delete
[230] Fix | Delete
##
[231] Fix | Delete
# Iterates over all IP addresses for +name+ retrieved from the hosts file.
[232] Fix | Delete
[233] Fix | Delete
def each_address(name, &proc)
[234] Fix | Delete
lazy_initialize
[235] Fix | Delete
if @name2addr.include?(name)
[236] Fix | Delete
@name2addr[name].each(&proc)
[237] Fix | Delete
end
[238] Fix | Delete
end
[239] Fix | Delete
[240] Fix | Delete
##
[241] Fix | Delete
# Gets the hostname of +address+ from the hosts file.
[242] Fix | Delete
[243] Fix | Delete
def getname(address)
[244] Fix | Delete
each_name(address) {|name| return name}
[245] Fix | Delete
raise ResolvError.new("#{@filename} has no address: #{address}")
[246] Fix | Delete
end
[247] Fix | Delete
[248] Fix | Delete
##
[249] Fix | Delete
# Gets all hostnames for +address+ from the hosts file.
[250] Fix | Delete
[251] Fix | Delete
def getnames(address)
[252] Fix | Delete
ret = []
[253] Fix | Delete
each_name(address) {|name| ret << name}
[254] Fix | Delete
return ret
[255] Fix | Delete
end
[256] Fix | Delete
[257] Fix | Delete
##
[258] Fix | Delete
# Iterates over all hostnames for +address+ retrieved from the hosts file.
[259] Fix | Delete
[260] Fix | Delete
def each_name(address, &proc)
[261] Fix | Delete
lazy_initialize
[262] Fix | Delete
if @addr2name.include?(address)
[263] Fix | Delete
@addr2name[address].each(&proc)
[264] Fix | Delete
end
[265] Fix | Delete
end
[266] Fix | Delete
end
[267] Fix | Delete
[268] Fix | Delete
##
[269] Fix | Delete
# Resolv::DNS is a DNS stub resolver.
[270] Fix | Delete
#
[271] Fix | Delete
# Information taken from the following places:
[272] Fix | Delete
#
[273] Fix | Delete
# * STD0013
[274] Fix | Delete
# * RFC 1035
[275] Fix | Delete
# * ftp://ftp.isi.edu/in-notes/iana/assignments/dns-parameters
[276] Fix | Delete
# * etc.
[277] Fix | Delete
[278] Fix | Delete
class DNS
[279] Fix | Delete
[280] Fix | Delete
##
[281] Fix | Delete
# Default DNS Port
[282] Fix | Delete
[283] Fix | Delete
Port = 53
[284] Fix | Delete
[285] Fix | Delete
##
[286] Fix | Delete
# Default DNS UDP packet size
[287] Fix | Delete
[288] Fix | Delete
UDPSize = 512
[289] Fix | Delete
[290] Fix | Delete
##
[291] Fix | Delete
# Creates a new DNS resolver. See Resolv::DNS.new for argument details.
[292] Fix | Delete
#
[293] Fix | Delete
# Yields the created DNS resolver to the block, if given, otherwise
[294] Fix | Delete
# returns it.
[295] Fix | Delete
[296] Fix | Delete
def self.open(*args)
[297] Fix | Delete
dns = new(*args)
[298] Fix | Delete
return dns unless block_given?
[299] Fix | Delete
begin
[300] Fix | Delete
yield dns
[301] Fix | Delete
ensure
[302] Fix | Delete
dns.close
[303] Fix | Delete
end
[304] Fix | Delete
end
[305] Fix | Delete
[306] Fix | Delete
##
[307] Fix | Delete
# Creates a new DNS resolver.
[308] Fix | Delete
#
[309] Fix | Delete
# +config_info+ can be:
[310] Fix | Delete
#
[311] Fix | Delete
# nil:: Uses /etc/resolv.conf.
[312] Fix | Delete
# String:: Path to a file using /etc/resolv.conf's format.
[313] Fix | Delete
# Hash:: Must contain :nameserver, :search and :ndots keys.
[314] Fix | Delete
# :nameserver_port can be used to specify port number of nameserver address.
[315] Fix | Delete
#
[316] Fix | Delete
# The value of :nameserver should be an address string or
[317] Fix | Delete
# an array of address strings.
[318] Fix | Delete
# - :nameserver => '8.8.8.8'
[319] Fix | Delete
# - :nameserver => ['8.8.8.8', '8.8.4.4']
[320] Fix | Delete
#
[321] Fix | Delete
# The value of :nameserver_port should be an array of
[322] Fix | Delete
# pair of nameserver address and port number.
[323] Fix | Delete
# - :nameserver_port => [['8.8.8.8', 53], ['8.8.4.4', 53]]
[324] Fix | Delete
#
[325] Fix | Delete
# Example:
[326] Fix | Delete
#
[327] Fix | Delete
# Resolv::DNS.new(:nameserver => ['210.251.121.21'],
[328] Fix | Delete
# :search => ['ruby-lang.org'],
[329] Fix | Delete
# :ndots => 1)
[330] Fix | Delete
[331] Fix | Delete
def initialize(config_info=nil)
[332] Fix | Delete
@mutex = Mutex.new
[333] Fix | Delete
@config = Config.new(config_info)
[334] Fix | Delete
@initialized = nil
[335] Fix | Delete
end
[336] Fix | Delete
[337] Fix | Delete
# Sets the resolver timeouts. This may be a single positive number
[338] Fix | Delete
# or an array of positive numbers representing timeouts in seconds.
[339] Fix | Delete
# If an array is specified, a DNS request will retry and wait for
[340] Fix | Delete
# each successive interval in the array until a successful response
[341] Fix | Delete
# is received. Specifying +nil+ reverts to the default timeouts:
[342] Fix | Delete
# [ 5, second = 5 * 2 / nameserver_count, 2 * second, 4 * second ]
[343] Fix | Delete
#
[344] Fix | Delete
# Example:
[345] Fix | Delete
#
[346] Fix | Delete
# dns.timeouts = 3
[347] Fix | Delete
#
[348] Fix | Delete
def timeouts=(values)
[349] Fix | Delete
@config.timeouts = values
[350] Fix | Delete
end
[351] Fix | Delete
[352] Fix | Delete
def lazy_initialize # :nodoc:
[353] Fix | Delete
@mutex.synchronize {
[354] Fix | Delete
unless @initialized
[355] Fix | Delete
@config.lazy_initialize
[356] Fix | Delete
@initialized = true
[357] Fix | Delete
end
[358] Fix | Delete
}
[359] Fix | Delete
self
[360] Fix | Delete
end
[361] Fix | Delete
[362] Fix | Delete
##
[363] Fix | Delete
# Closes the DNS resolver.
[364] Fix | Delete
[365] Fix | Delete
def close
[366] Fix | Delete
@mutex.synchronize {
[367] Fix | Delete
if @initialized
[368] Fix | Delete
@initialized = false
[369] Fix | Delete
end
[370] Fix | Delete
}
[371] Fix | Delete
end
[372] Fix | Delete
[373] Fix | Delete
##
[374] Fix | Delete
# Gets the IP address of +name+ from the DNS resolver.
[375] Fix | Delete
#
[376] Fix | Delete
# +name+ can be a Resolv::DNS::Name or a String. Retrieved address will
[377] Fix | Delete
# be a Resolv::IPv4 or Resolv::IPv6
[378] Fix | Delete
[379] Fix | Delete
def getaddress(name)
[380] Fix | Delete
each_address(name) {|address| return address}
[381] Fix | Delete
raise ResolvError.new("DNS result has no information for #{name}")
[382] Fix | Delete
end
[383] Fix | Delete
[384] Fix | Delete
##
[385] Fix | Delete
# Gets all IP addresses for +name+ from the DNS resolver.
[386] Fix | Delete
#
[387] Fix | Delete
# +name+ can be a Resolv::DNS::Name or a String. Retrieved addresses will
[388] Fix | Delete
# be a Resolv::IPv4 or Resolv::IPv6
[389] Fix | Delete
[390] Fix | Delete
def getaddresses(name)
[391] Fix | Delete
ret = []
[392] Fix | Delete
each_address(name) {|address| ret << address}
[393] Fix | Delete
return ret
[394] Fix | Delete
end
[395] Fix | Delete
[396] Fix | Delete
##
[397] Fix | Delete
# Iterates over all IP addresses for +name+ retrieved from the DNS
[398] Fix | Delete
# resolver.
[399] Fix | Delete
#
[400] Fix | Delete
# +name+ can be a Resolv::DNS::Name or a String. Retrieved addresses will
[401] Fix | Delete
# be a Resolv::IPv4 or Resolv::IPv6
[402] Fix | Delete
[403] Fix | Delete
def each_address(name)
[404] Fix | Delete
each_resource(name, Resource::IN::A) {|resource| yield resource.address}
[405] Fix | Delete
if use_ipv6?
[406] Fix | Delete
each_resource(name, Resource::IN::AAAA) {|resource| yield resource.address}
[407] Fix | Delete
end
[408] Fix | Delete
end
[409] Fix | Delete
[410] Fix | Delete
def use_ipv6? # :nodoc:
[411] Fix | Delete
begin
[412] Fix | Delete
list = Socket.ip_address_list
[413] Fix | Delete
rescue NotImplementedError
[414] Fix | Delete
return true
[415] Fix | Delete
end
[416] Fix | Delete
list.any? {|a| a.ipv6? && !a.ipv6_loopback? && !a.ipv6_linklocal? }
[417] Fix | Delete
end
[418] Fix | Delete
private :use_ipv6?
[419] Fix | Delete
[420] Fix | Delete
##
[421] Fix | Delete
# Gets the hostname for +address+ from the DNS resolver.
[422] Fix | Delete
#
[423] Fix | Delete
# +address+ must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved
[424] Fix | Delete
# name will be a Resolv::DNS::Name.
[425] Fix | Delete
[426] Fix | Delete
def getname(address)
[427] Fix | Delete
each_name(address) {|name| return name}
[428] Fix | Delete
raise ResolvError.new("DNS result has no information for #{address}")
[429] Fix | Delete
end
[430] Fix | Delete
[431] Fix | Delete
##
[432] Fix | Delete
# Gets all hostnames for +address+ from the DNS resolver.
[433] Fix | Delete
#
[434] Fix | Delete
# +address+ must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved
[435] Fix | Delete
# names will be Resolv::DNS::Name instances.
[436] Fix | Delete
[437] Fix | Delete
def getnames(address)
[438] Fix | Delete
ret = []
[439] Fix | Delete
each_name(address) {|name| ret << name}
[440] Fix | Delete
return ret
[441] Fix | Delete
end
[442] Fix | Delete
[443] Fix | Delete
##
[444] Fix | Delete
# Iterates over all hostnames for +address+ retrieved from the DNS
[445] Fix | Delete
# resolver.
[446] Fix | Delete
#
[447] Fix | Delete
# +address+ must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved
[448] Fix | Delete
# names will be Resolv::DNS::Name instances.
[449] Fix | Delete
[450] Fix | Delete
def each_name(address)
[451] Fix | Delete
case address
[452] Fix | Delete
when Name
[453] Fix | Delete
ptr = address
[454] Fix | Delete
when IPv4::Regex
[455] Fix | Delete
ptr = IPv4.create(address).to_name
[456] Fix | Delete
when IPv6::Regex
[457] Fix | Delete
ptr = IPv6.create(address).to_name
[458] Fix | Delete
else
[459] Fix | Delete
raise ResolvError.new("cannot interpret as address: #{address}")
[460] Fix | Delete
end
[461] Fix | Delete
each_resource(ptr, Resource::IN::PTR) {|resource| yield resource.name}
[462] Fix | Delete
end
[463] Fix | Delete
[464] Fix | Delete
##
[465] Fix | Delete
# Look up the +typeclass+ DNS resource of +name+.
[466] Fix | Delete
#
[467] Fix | Delete
# +name+ must be a Resolv::DNS::Name or a String.
[468] Fix | Delete
#
[469] Fix | Delete
# +typeclass+ should be one of the following:
[470] Fix | Delete
#
[471] Fix | Delete
# * Resolv::DNS::Resource::IN::A
[472] Fix | Delete
# * Resolv::DNS::Resource::IN::AAAA
[473] Fix | Delete
# * Resolv::DNS::Resource::IN::ANY
[474] Fix | Delete
# * Resolv::DNS::Resource::IN::CNAME
[475] Fix | Delete
# * Resolv::DNS::Resource::IN::HINFO
[476] Fix | Delete
# * Resolv::DNS::Resource::IN::MINFO
[477] Fix | Delete
# * Resolv::DNS::Resource::IN::MX
[478] Fix | Delete
# * Resolv::DNS::Resource::IN::NS
[479] Fix | Delete
# * Resolv::DNS::Resource::IN::PTR
[480] Fix | Delete
# * Resolv::DNS::Resource::IN::SOA
[481] Fix | Delete
# * Resolv::DNS::Resource::IN::TXT
[482] Fix | Delete
# * Resolv::DNS::Resource::IN::WKS
[483] Fix | Delete
#
[484] Fix | Delete
# Returned resource is represented as a Resolv::DNS::Resource instance,
[485] Fix | Delete
# i.e. Resolv::DNS::Resource::IN::A.
[486] Fix | Delete
[487] Fix | Delete
def getresource(name, typeclass)
[488] Fix | Delete
each_resource(name, typeclass) {|resource| return resource}
[489] Fix | Delete
raise ResolvError.new("DNS result has no information for #{name}")
[490] Fix | Delete
end
[491] Fix | Delete
[492] Fix | Delete
##
[493] Fix | Delete
# Looks up all +typeclass+ DNS resources for +name+. See #getresource for
[494] Fix | Delete
# argument details.
[495] Fix | Delete
[496] Fix | Delete
def getresources(name, typeclass)
[497] Fix | Delete
ret = []
[498] Fix | Delete
each_resource(name, typeclass) {|resource| ret << resource}
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function