# File lib/rmail/header.rb, line 200 def fetch_all name, *rest if rest.length > 1 raise ArgumentError, "wrong # of arguments(#{rest.length + 1} for 2)" end result = select(name) if result.nil? if block_given? yield name elsif rest.length == 1 rest[0] else raise IndexError, 'name not found' end else result.collect { |n, v| v } end end