module Enumerable

def one_with_pattern?(pattern = Backports::Undefined, &block)

def one_with_pattern?(pattern = Backports::Undefined, &block)
  return one_without_pattern?(&block) if Backports::Undefined == pattern
  found_one = false
  each_entry do |o|
    if pattern === o
      return false if found_one
      found_one = true
    end
  end
  found_one
end