class Bundler::Thor::Options
def check_unknown!
def check_unknown! # an unknown option starts with - or -- and has no more --'s afterward. unknown = @extra.select { |str| str =~ /^--?(?:(?!--).)*$/ } fail UnknownArgumentError, "Unknown switches '#{unknown.join(', ')}'" unless unknown.empty? end