On 11-07-2014 12:37, Jeremy Evans wrote:
On Friday, July 11, 2014 6:42:30 AM UTC-7, Rodrigo Rosenfeld Rosas wrote:

    I understand that this could be desired in an era where Ruby used
    to define Object#id, but currently I'd prefer my models to raise a
    NoMethodError if someone tries to acess #id from a model where the
    primary key has another name instead of simply returning nil.
    Fail-fast is a good strategy to prevent errors as soon as possible.


Object#id is still defined in ruby 1.8.7, and Sequel still supports ruby 1.8.7. Until we drop ruby 1.8.7 support, Model#id needs to stay. If we do decide to remove it after dropping ruby 1.8.7 support, it still needs to be properly deprecated.


I'm curious. How do you decide when to stop supporting some Ruby version?

1.8.7 has reached EOL from the MRI team and it's no longer supported by newer Rails releases for a while already. It also makes it harder for newcomers to contribute code as they might not even know that the new Hash syntax is not supported by Ruby 1.8, for example. And it's also responsible for things that wouldn't make sense otherwise, like the case for overriding Object#id, which no longer is defined since Ruby 1.9.

Anyway, if I understood correctly it's totally fine for me to add an undef_method(:id) to my model without any side effect on Sequel overall, right?

Thanks,
Rodrigo.

--
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to