------art_34623_5029297.1178373784282
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 5/5/07, dblack / wobblini.net <dblack / wobblini.net> wrote:
>
> Hi --
>
> On Sat, 5 May 2007, Nicholas Clare wrote:
>
> > On 5/5/07, Haoqi Haoqi <axgle / 126.com> wrote:
> >>
> >>
> >> > Hashes are unordered.  If you need an ordered collection, you'll need
> >> > to use an array.
> >>
> >>
> >> Hashes are unordered. that is how sadly for me,really!
> >>
> >> --
> >> Posted via http://www.ruby-forum.com/.
> >>
> >>
> >
> > Hi, I missed some of this thread, I only just joined the list. Although
> it's
> > less than optimal, can you not just sort the keys when you need them.
> > Something like:
> >
> > require 'enumerator'
> > sorted_keys  ash.enum_for(:each_key).to_a.sort
> >
> > Again, there might very well be a better way to do even that, I'm new to
> > ruby.
>
>
>    sorted_keys  ash.keys.sort
>
> :-)
>
>
> David
>
> --
> Q. What is THE Ruby book for Rails developers?
> A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black)
>     (See what readers are saying!  http://www.rubypal.com/r4rrevs.pdf)
> Q. Where can I get Ruby/Rails on-site training, consulting, coaching?
> A. Ruby Power and Light, LLC (http://www.rubypal.com)
>
>
Hi

Well, that certainly is easier. Coming from other programming languages
(which I won't name), I expect the answer to be more tricky than it is. I'm
learning something new every day

Thanks,
Nick

------art_34623_5029297.1178373784282--