# File lib/core/facets/enumerable/only.rb, line 18
  def only
    first = false
    first_item = nil

    each do |item|
      if first
        raise IndexError, "not the only element of enumerable"
      else
        first = true
        first_item = item
      end
    end
 
    if first
      return first_item
    else
      raise IndexError, "not the only element of enumerable"
    end
  end