From: "trans. (T. Onoma)" Date: 2004-10-31T02:40:40+09:00 Subject: Re: range.c BTW, Matz, are you still planing to alias #member? to #include? That fits in with the work I'm doing so I can easily do it and adjust docs as I promised. I will present my complete proposal for range later (on monday I think) and then you and the community can let me know what you think. Thanks, T. On Saturday 30 October 2004 12:43 pm, trans. (T. Onoma) wrote: | HI -- | | I have been working on improving Range class today per discussions on | ruby-talk. First I created a prototype in pure Ruby --that looks great. | Then I delimited the changes into two groups: those readily doable (will | not cause back-breakage) and those that are not. | | So now I am working on the C source to incorporate readily doable changes | --the main of which is to add an exclude_start? parameter. I have already | done this and tested it. Works well. The only problem I have is how to | change the hash method: | | static VALUE | range_hash(range) | VALUE range; | { | long hash = EXCL(range); | VALUE v; | | v = rb_hash(rb_ivar_get(range, id_beg)); | hash ^= v << 1; | v = rb_hash(rb_ivar_get(range, id_end)); | hash ^= v << 9; | hash ^= EXCL(range) << 24; | hash ^= EXCLB(range) << 25; /* 25? what number? */ | | return LONG2FIX(hash); | } | | Also, I am using 1.8.2pre2 code, should I be using 1.9? | | Thanks, | T. | | P.S. I will discuss further once I fix the above.