[Ironruby-core] Implementing the Time class

Charles Oliver Nutter charles.nutter at sun.com
Fri Oct 26 12:54:47 EDT 2007

Eric Nicholson wrote:
> So I was working on File, but that had a few routines which returned 
> Time objects, so I started a sidetrack on that which took a little 
> longer than I expected.  I have most of it complete (except for 
> strformat) implemented as an extension to the .net Date/DateTime class.
> I've also integrated the Rubinius Time specs into the test project with 
> some hiccups.  Almost half of the tests are passing, with the bulk of 
> the failures due to the specs use of the "ENV" object to set the time 
> zone before testing out the Time class.  Personally I think that 
> monkeying with the system clock isn't a great test idea anyway, and I 
> don't know of a good cross platform way to handle it.
> So what do you suppose I should do here?
> * Implement new tests that are more portable (I doubt I have time to 
> work out Rubinius' commit/patch requirements)
> * Just disable the tests that use ENV
> * Implement new tests just for IR

Please don't implement tests that target a specific implementation, 
especially for core classes. Spend the time to make the tests work 

For what it's worth, though, ENV is required by *lots* of apps and 
script in Ruby. You're going to need to have it working anyway. As for 
time-zone tweakage...anything that's a side effect of setting ENV should 
probably be modified.

You should also talk to the rubinius guys about how to run the specs 
such that they filter out things IR might never support.

- Charlie

More information about the Ironruby-core mailing list