lib/credentials/rule.rb in credentials-2.4.1 vs lib/credentials/rule.rb in credentials-2.4.2

- old
+ new

@@ -53,10 +53,10 @@ parameters.zip(args).each do |expected, actual| case expected when :self then return false unless actual == args.first when Array then return false unless expected.any? { |item| (item === actual) || (item == :self && actual == args.first) } - else return false unless expected == actual || expected === actual + else return false unless expected == actual || expected === actual || (expected.is_a?(Class) && actual.is_a?(Class) && actual.ancestors.include?(expected)) end end result = true result = result && (options.keys & Credentials::Prepositions).inject(true) { |memo, key| memo && evaluate_preposition(args.first, options[key], values[key]) } \ No newline at end of file