Closed saizai closed 9 years ago
Not sure how this differs from the existing code, which still returns nil for a nil date value. Can you give me an example that shows why it's needed?
In Rubinius:
> Date.parse(nil)
TypeError: can't dup NilClass
from kernel/common/immediate.rb:25:in `dup'
Ah, ok. Right now Fech doesn't support Rubinius, but I'd be open to a PR that does that, not just for date parsing, but for the entire library.
I'm using it in Rubinius right now, importing everything from the first v3 record onwards. I'll PR as needed, but so far nothing else is Rubinius related AFAICT.
Ok - if the other specs pass in Rubinius and this is the only fix needed, that would be great.
Done. See https://github.com/NYTimes/Fech/pull/72
@dwillis Any reason not to merge this now? It's at worst equivalent to previous functionality, and fixes it on Rubinius.
@dwillis ?