bebanjo / delorean

DISCONTINUED - Delorean lets you travel in time with Ruby by mocking Time.now
MIT License
454 stars 25 forks source link

support subclasses of Date, Time, and DateTime #18

Closed yaauie closed 11 years ago

yaauie commented 12 years ago

subclasses of the above classes don't survive the round-trip through Delorean, returning their superclass instead. Notably, Zip::DOSTime (rubyzip) inherits from Time, but Zip::DOSTime.now returns an instance of Time (see #25 in jtrupiano/timecop)

This patch alleviates the problem, and attempts to do so in as clean a manner as possible.

travisbot commented 12 years ago

This pull request fails (merged 25e5ca68 into c86b3970).

cavalle commented 12 years ago

@yaauie your PR makes sense to me but, according to @travisbot, tests doesn't pass in ruby 1.9.3. Could you take a look and fix them? Cheers!

travisbot commented 12 years ago

This pull request passes (merged cd44704d into c86b3970).

yaauie commented 12 years ago

Odd, since that's what I developed on and tested on locally. I have added commits that change this to use iso8601, which shouldn't be susceptible to unix-epoch restraints.

yaauie commented 12 years ago

ping

cavalle commented 11 years ago

So sorry for the delay!!