Re: putting away HashWithIndifferentAccess

2007-09-28 Thread Jonas Pfenniger
2007/9/27, why the lucky stiff [EMAIL PROTECTED]: Well, case-sensitiveness would be a prob with 1.5 as well. Since @env.HTTP_HOST will work and @env.http_host will not. True. So what do you think of the attached patch ? It removes roughly 50 octets to camping.rb and seems to work pretty well,

Re: putting away HashWithIndifferentAccess

2007-09-26 Thread Jonas Pfenniger
2007/9/26, why the lucky stiff [EMAIL PROTECTED]: Hey, campineros. And many good handshakes to zimbatm for getting some patches applied. You're welcome ! Markaby's going to take much more work. Part of the issue is: how does an app tell Camping that it needs to use Markaby without

Re: putting away HashWithIndifferentAccess

2007-09-26 Thread Julian 'Julik' Tarkhanov
On Sep 26, 2007, at 4:24 AM, Evan Weaver wrote: As far as I can tell, sym_tbl is just a regular st_table, so it's an expanding array similar to the Ruby heap. Oddly enough, this: c = 0 loop { c += 1; puts two_symbols_sitting_in_a_tree_#{c}.to_sym } was a total crasher on 1.8.5 but works on

Re: putting away HashWithIndifferentAccess

2007-09-26 Thread Julian 'Julik' Tarkhanov
On Sep 26, 2007, at 12:35 AM, Julian 'Julik' Tarkhanov wrote: class H (HashWithIndifferentAccess rescue Hash) To be clear, I'm really for the hash also because I use the obj = @items.delete paradigm to signify take this item out because we'll work with it). But you can optionally

Re: putting away HashWithIndifferentAccess

2007-09-26 Thread why the lucky stiff
On Wed, Sep 26, 2007 at 11:33:42AM +0200, Jonas Pfenniger wrote: I suggest that H is a child of Hash. Extensions can extend it to provide method_missing goodness or anything else. The only concern I have is about case-sensitiveness. I am not sure if the http headers are normalized on input or

Re: putting away HashWithIndifferentAccess

2007-09-26 Thread Jonas Pfenniger
Minimal HWIA removal patch attached. So far, the examples, file upload, sessions, all work under mongrel with the patch applied. _why, is it something like that that you want ? I'm not even sure if HWIA extension is useful. The method_missing shortcut is even shorter than the one with :symbols.

Re: putting away HashWithIndifferentAccess

2007-09-25 Thread Julian 'Julik' Tarkhanov
On Sep 26, 2007, at 12:26 AM, why the lucky stiff wrote: class H OpenStruct How about class H (HashWithIndifferentAccess rescue Hash) for the lesser among us (who always include and require)? -- Julian 'Julik' Tarkhanov please send all personal mail to [EMAIL PROTECTED]

Re: putting away HashWithIndifferentAccess

2007-09-25 Thread Evan Weaver
Regular hashes are good. Would need to make a decision whether to prefer string or symbol keys. String is easier to support; Symbol looks prettier in your editor. Evan On 9/25/07, Julian 'Julik' Tarkhanov [EMAIL PROTECTED] wrote: On Sep 26, 2007, at 12:26 AM, why the lucky stiff wrote:

Re: putting away HashWithIndifferentAccess

2007-09-25 Thread Julian 'Julik' Tarkhanov
On Sep 26, 2007, at 2:05 AM, MenTaLguY wrote: behind the scenes, every uniquely named method introduces a symbol. yep. but then it's _you_ who calls that accessor, not some John Doe who sends you a POST :-) -- Julian 'Julik' Tarkhanov please send all personal mail to [EMAIL PROTECTED]

Re: putting away HashWithIndifferentAccess

2007-09-25 Thread Evan Weaver
On 9/25/07, Julian 'Julik' Tarkhanov [EMAIL PROTECTED] wrote: this might already be a server crasher. you know how many unique to_syms you can do before the table is full? As far as I can tell, sym_tbl is just a regular st_table, so it's an expanding array similar to the Ruby heap. So there's