RAA - orderedhash/1.0-r5

orderedhash / 1.0-r5

Short description: Override Hash to make it creation order preserved
Category: Library/Datastructure
Status: stable
Created: 2004-09-17 16:37:45 GMT
Last update: 2004-10-11 21:45:41 GMT
Owner: Jan Molič (Projects of this owner)
Homepage: http://orderedhash.1984.cz/
Download: http://orderedhash.1984.cz/orderedhash.rb
License: PublicDomain
Dependency:
None
Description:

BEHAVIOR CHANGED! Andrew Johnson's lxHash project merged; Hash is not defaultly ordered now plus other changes and fixes.

require 'orderedhash'
hsh = Hash.new
hsh.ordered!
hsh['z'] = 1
hsh['a'] = 2
hsh['c'] = 3
p hsh.keys # ['z','a','c']

Versions: [1.2006.07.13 (2007-07-05)] [1.2006.05.23 (2006-05-25)] [1.2005.8.16 (2005-08-16)] [1.2005.8.8 (2005-08-15)] [2.0 (2004-12-07)] [2.0-rc1 (2004-11-19)] [1.1 (2004-11-19)] [1.0-r5 (2004-10-11)] [1.0-r4 (2004-10-07)] [0.1 (2004-09-17)]

Edit this project (for project owner)

back to RAA top