Module: Gemmy::Patches::ArrayPatch::InstanceMethods::NonUniq

Defined in:
lib/gemmy/patches/array_patch.rb

Instance Method Summary collapse

Instance Method Details

#nonuniqObject

facets



201
202
203
204
205
206
207
208
209
# File 'lib/gemmy/patches/array_patch.rb', line 201

def nonuniq
  h1 = {}
  h2 = {}
  each {|i|
    h2[i] = true if h1[i]
    h1[i] = true
  }
  h2.keys
end