Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
ext/encoding/character/utf-8/data/generate-unicode-data.rb

Instance Method Summary collapse

Instance Method Details

#enumerate_orderedObject



82
83
84
85
86
87
88
89
90
91
92
93
# File 'ext/encoding/character/utf-8/data/generate-unicode-data.rb', line 82

def enumerate_ordered
  n = 0
  self.keys.sort.each do |code|
    if self[code] == 1
	self.delete(code)
	next
    end
    self[code] = n
    n += 1
  end
  n
end