Indeed.
My question was whether this should be considered a bug: #today is
kind of a specialized version of #new, so I would expect the
implementation to be #new like, and return a MyDate.
Indeed.
My question was whether this should be considered a bug: #today is
kind of a specialized version of #new, so I would expect the
implementation to be #new like, and return a MyDate.
That sounds to me like someone used Date.new instead of self.new in
class method somewhere.
And yeah, I’d look at it as a bug too. As a workaround, you can
probably do a manual conversion…
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.