From: Brian McCallister Date: 2006-08-13T02:53:27+09:00 Subject: Re: PATCH to make internal Hash class retain order... On Aug 12, 2006, at 9:55 AM, Thies C. Arntzen wrote: > Hi there - > > beeing new to ruby (thru rails) and coming from a strong php > background > * remember the order in which elements have been added to a Hash (at > the cost of 2 extra pointers in every hash-bucket + 2 extra pointers > per hash-table) > * use this order for iterating (st_foreach will use this order) > * implement a call Hash.order! allows the user to change the internal > order;-) Nice :-) The better place for discussion hacking on the ruby interpreter itself is probably ruby-core. How difficult would it be to do an OrderedHash data structure as a C extension instead of in Ruby? -Brian