Project

General

Profile

Misc #10754 ยป patch.diff

ismael (Ismael Abreu), 01/18/2015 01:18 AM

View differences:

lib/set.rb
78 78
  # If a block is given, the elements of enum are preprocessed by the
79 79
  # given block.
80 80
  def initialize(enum = nil, &block) # :yields: o
81
    @hash ||= Hash.new
81
    @hash ||= Hash.new(false)
82 82

  
83 83
    enum.nil? and return
84 84

  
......
209 209

  
210 210
  # Returns true if the set contains the given object.
211 211
  def include?(o)
212
    @hash.include?(o)
212
    @hash[o]
213 213
  end
214 214
  alias member? include?
215 215