module RSpec::Core::Hooks
def extract_scope_from(args)
def extract_scope_from(args) if SCOPES.include?(args.first) args.shift elsif args.any? { |a| a.is_a?(Symbol) } raise ArgumentError.new("You must explicitly give a scope (:each, :all, or :suite) when using symbols as metadata for a hook.") else :each end end