# File lib/rmail/header.rb, line 177def fetch(name, *rest)
if rest.length > 1
raise ArgumentError, "wrong # of arguments(#{rest.length + 1} for 2)"
end
result = self[name]
if result.nil?
if block_given?
yield name
elsif rest.length == 1
rest[0]
else
raise IndexError, 'name not found'endelse
result
endend