On Fri, Feb 18, 2011 at 7:02 PM, Frederick Cheung
<[email protected]> wrote:

> On 17 Feb 2011, at 08:49, Xavier Noria wrote:
>> I wrote this off the top of my head, but if I am not mistaken we have
>> now a countable number of pairs between (1, 0) and (2, 0). Namely, (1,
>> 1), (1, 2), .... So, using pseudonotation, ((1, 0)..(2,
>> 0)).include?((3, 0)) won't even finish in 1.9, while it did before.
>>
>> This is just an example to depict why they are not equivalents, it
>> might be artificial, but I don't know perhaps there's some application
>> out there assuming this behavior.
>>
> Doesn't seem any more artificial than the cases used to justify the 1.9 
> behaviour.
>
> I've added patch & ticket at 
> https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/6453-use-cover-for-validates_inclusion_of-with-ranges-on-19
>  . It's not very beautiful though

Excellent.

I pondered backporting cover? for 1.8 in Active Support (there are
some backports, you know) and have one single definition of the
validator, but I am not convinced this approach is really justified.

Applied, thanks Fred!

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to