Looks like I have skipped on this, but still - a couple of questions: 1) Why there suddenly is an OrderedHash in ActiveSupport? (this glaring omission from ruby core is present in many apps already) 2) Why it doesn''t match the semantics of Hash respectively? 3) Why it''s #nodoc ? -- Julian ''Julik'' Tarkhanov please send all personal mail to me at julik.nl
On 27-apr-2006, at 20:18, Julian ''Julik'' Tarkhanov wrote:> Looks like I have skipped on this, but still - a couple of questions: > > 1) Why there suddenly is an OrderedHash in ActiveSupport? (this > glaring omission from ruby core is present in many apps already) > 2) Why it doesn''t match the semantics of Hash respectively? > 3) Why it''s #nodoc ?Now filed as #4911. I would like to hear from the core before making a patch. -- Julian ''Julik'' Tarkhanov please send all personal mail to me at julik.nl
On 4/27/06, Julian ''Julik'' Tarkhanov <listbox@julik.nl> wrote:> > On 27-apr-2006, at 20:18, Julian ''Julik'' Tarkhanov wrote: > > > Looks like I have skipped on this, but still - a couple of questions: > > > > 1) Why there suddenly is an OrderedHash in ActiveSupport? (this > > glaring omission from ruby core is present in many apps already) > > 2) Why it doesn''t match the semantics of Hash respectively? > > 3) Why it''s #nodoc ? > > Now filed as #4911. I would like to hear from the core before making > a patch.I extracted the common bits out of OrderedOptions. If there''s a ruby version already that would work, I''ll gladly switch to it. -- Rick Olson http://techno-weenie.net
I remember seeing a Collection class out there somewhere that did the same sort of thing.... -jeff On 4/27/06, Rick Olson <technoweenie@gmail.com> wrote:> On 4/27/06, Julian ''Julik'' Tarkhanov <listbox@julik.nl> wrote: > > > > On 27-apr-2006, at 20:18, Julian ''Julik'' Tarkhanov wrote: > > > > > Looks like I have skipped on this, but still - a couple of questions: > > > > > > 1) Why there suddenly is an OrderedHash in ActiveSupport? (this > > > glaring omission from ruby core is present in many apps already) > > > 2) Why it doesn''t match the semantics of Hash respectively? > > > 3) Why it''s #nodoc ? > > > > Now filed as #4911. I would like to hear from the core before making > > a patch. > > I extracted the common bits out of OrderedOptions. If there''s a ruby > version already that would work, I''ll gladly switch to it. > > -- > Rick Olson > http://techno-weenie.net > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core >-- Jeff Lindsay http://blogrium.com/
On 27-apr-2006, at 21:12, Rick Olson wrote:> On 4/27/06, Julian ''Julik'' Tarkhanov <listbox@julik.nl> wrote: >> >> On 27-apr-2006, at 20:18, Julian ''Julik'' Tarkhanov wrote: >> >>> Looks like I have skipped on this, but still - a couple of >>> questions: >>> >>> 1) Why there suddenly is an OrderedHash in ActiveSupport? (this >>> glaring omission from ruby core is present in many apps already) >>> 2) Why it doesn''t match the semantics of Hash respectively? >>> 3) Why it''s #nodoc ? >> >> Now filed as #4911. I would like to hear from the core before making >> a patch. > > I extracted the common bits out of OrderedOptions. If there''s a ruby > version already that would work, I''ll gladly switch to it.Hi Rick, thanks for chiming in. Here are a few example implementations: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/20551 http://raa.ruby-lang.org/project/orderedhash/ I''d say the choice is broad, pick any :-) -- Julian ''Julik'' Tarkhanov please send all personal mail to me at julik.nl
On 27-apr-2006, at 21:12, Rick Olson wrote:> On 4/27/06, Julian ''Julik'' Tarkhanov <listbox@julik.nl> wrote: >> >> On 27-apr-2006, at 20:18, Julian ''Julik'' Tarkhanov wrote: >> >>> Looks like I have skipped on this, but still - a couple of >>> questions: >>> >>> 1) Why there suddenly is an OrderedHash in ActiveSupport? (this >>> glaring omission from ruby core is present in many apps already) >>> 2) Why it doesn''t match the semantics of Hash respectively? >>> 3) Why it''s #nodoc ? >> >> Now filed as #4911. I would like to hear from the core before making >> a patch. > > I extracted the common bits out of OrderedOptions. If there''s a ruby > version already that would work, I''ll gladly switch to it.Patched, please confirm if it''s OK -- Julian ''Julik'' Tarkhanov please send all personal mail to me at julik.nl
> Patched, please confirm if it''s OK > > -- > Julian ''Julik'' Tarkhanov > please send all personal mail to > me at julik.nlLooks good. I actually wouldn''t mind reverting OrderedOptions back to its original form and using a real OrderedHash implementation for Calculations some day. That''s what I would have done if I had spent 5 minutes googling before I wrote it. Thanks for the patch. http://dev.rubyonrails.org/changeset/4318 rick -- Rick Olson http://techno-weenie.net