Match against +Fear::Success+

 @param conditions [<#==>]
 @return [Fear::TryPatternMatch]
326185
def success(*conditions, &effect)
      branch = Fear.case(Fear::Success, &SUCCESS_EXTRACTOR).and_then(Fear.case(*conditions, &effect))
      or_else(branch)
    end
1104026
def left(*conditions, &effect)
      branch = Fear.case(Fear::Left, &LEFT_EXTRACTOR).and_then(Fear.case(*conditions, &effect))
      or_else(branch)
    end
1021333
public SDVariable matchCondition(SDVariable in, Condition condition) {
        return new MatchConditionTransform(sameDiff(), in, condition).outputVariable();
    }
63001
def is_match(subject: Expression, pattern: Expression) -> bool:
    
    return any(True for _ in match(subject, pattern))
574539
function match(args, typeMap) {
  // No arguments, no win.
  if (!args || !args.length) {
    throw new Error('Cannot perform overload.match: args must be non-null array');
  } else if (!typeMap || !typeMap.length) {
    // We always satisfy a null or empty typeMap
    return true;
  }

  // Validate the arguments one by one
  for (let index = 0; index < args.length; index++) {
    if (!compatible(args[index], typeMap[index])) {
      return false;
    }
  }

  // If not incompatible, sucess
  return true;
}
345579
def match(self, row):
        
        if row[self._field] in self._values:
            return True

        for condition in self._conditions:
            if condition.match(row):
                return True

        return False
461178
def matches(self, other):
        
        if not isinstance(other, Failure):
            return False
        if self.exc_info is None or other.exc_info is None:
            return self._matches(other)
        else:
            return self == other
138054
public boolean assessMatch(final OgnlContext ognlContext) throws OgnlException
	{

		if (! inputRun)
		{
			throw new IllegalArgumentException("Attempted to match on a rule whose rulesets input has not yet been produced");
		}

		final Object result = condition.run(ognlContext, ognlContext);

		if (result == null || !Boolean.class.isAssignableFrom(result.getClass()))
		{
			throw new IllegalArgumentException("Expression " + condition.getOriginalExpression() +
			                                   " did not return a boolean value");
		}

		matches = (Boolean) result;

		return matches;
	}
525623
def with(*conditions, &block)
      @filters ||= []

      @filters << {:negate => false, :filter => block} if block
      conditions.each do |condition|
        @filters << {:negate => false, :filter => condition}
      end
    end
816045
def _matches_patterns(self, matches, context):
        
        if not self.disabled(context):
            patterns = self.effective_patterns(context)
            for pattern in patterns:
                if not pattern.disabled(context):
                    pattern_matches = pattern.matches(matches.input_string, context)
                    if pattern_matches:
                        log(pattern.log_level, "Pattern has %s match(es). (%s)", len(pattern_matches), pattern)
                    else:
                        pass
                        # log(pattern.log_level, "Pattern doesn't match. (%s)" % (pattern,))
                    for match in pattern_matches:
                        if match.marker:
                            log(pattern.log_level, "Marker found. (%s)", match)
                            matches.markers.append(match)
                        else:
                            log(pattern.log_level, "Match found. (%s)", match)
                            matches.append(match)
                else:
                    log(pattern.log_level, "Pattern is disabled. (%s)", pattern)
1151436
def match_pattern(expr_or_pattern: object, expr: object) -> MatchDict:
    
    try:  # first try expr_or_pattern as a Pattern
        return expr_or_pattern.match(expr)
    except AttributeError:  # expr_or_pattern is an expr, not a Pattern
        if expr_or_pattern == expr:
            return MatchDict()  # success
        else:
            res = MatchDict()
            res.success = False
            res.reason = "Expressions '%s' and '%s' are not the same" % (
                          repr(expr_or_pattern), repr(expr))
            return res
955078
def does_match?(msg, conditions)

      return true unless conditions

      conditions.each do |k, v|

        return false unless Array(v).find do |vv|

          # the Array(v) is for backward compatibility, although newer
          # track conditions are already stored as arrays.

          vv = Ruote.regex_or_s(vv)

          val = case k

            when 'class' then msg['error']['class']
            when 'message' then msg['error']['message']

            else Ruote.lookup(msg, k)
          end

          val && (vv.is_a?(Regexp) ? vv.match(val) : vv == val)
        end
      end

      true
    end
892344
def match(pattern_element)
    @num_match_attempts += 1
    return :no_pattern_element unless pattern_element
    return :skipped if pattern_element.delimiter &&
      (
      if last_match
        last_match.delimiter       # don't match two delimiters in a row
      else
        @num_match_attempts > 1   # don't match a delimiter as the first element unless this is the first match attempt
      end
      )

    if result = pattern_element.parse(self)
      add_match result, pattern_element.name # success, but don't keep EmptyNodes
    end
  end
1007119
public static Rule conditionsRule(final Set<Condition> conditions, String key, String value) {
        HashMap<String, String> results = new HashMap<>();
        results.put(key, value);
        return conditionsRule(conditions, results);
    }
699497
static boolean matches(CodeSigner[] signers, CodeSigner[] oldSigners,
        CodeSigner[] newSigners) {

        // special case
        if ((oldSigners == null) && (signers == newSigners))
            return true;

        boolean match;

        // make sure all oldSigners are in signers
        if ((oldSigners != null) && !isSubSet(oldSigners, signers))
            return false;

        // make sure all newSigners are in signers
        if (!isSubSet(newSigners, signers)) {
            return false;
        }

        // now make sure all the code signers in signers are
        // also in oldSigners or newSigners

        for (int i = 0; i < signers.length; i++) {
            boolean found =
                ((oldSigners != null) && contains(oldSigners, signers[i])) ||
                contains(newSigners, signers[i]);
            if (!found)
                return false;
        }
        return true;
    }
61043
def regex_condition(func):
    
    @wraps(func)
    def regex_condition_wrapper(condition, *args, **kwargs):
        if isinstance(condition, string_types):
            condition = maybe | partial(re.match, condition)
        return func(condition, *args, **kwargs)
    return regex_condition_wrapper
805480
def matches_pattern(self, other):
        
        properties = self._message_properties()
        ismatch = False
        if isinstance(other, Message) and self.code == other.code:
            for prop in properties:
                for key, prop_val in prop.items():
                    if hasattr(other, key):
                        key_val = getattr(other, key)
                        ismatch = self._test_match(prop_val, key_val)
                    else:
                        ismatch = False
                    if not ismatch:
                        break
                if not ismatch:
                    break
        return ismatch