What are overloads like this:
...(int second, int minute, int hour, int day, int month, int year, object
wday, object yday, object isdst, object zone)
good for?
It seems that the parameters typed to object are not used. Also when you cast
double to int it might overflow. What should happen if a big integer is passed
in?
This is also suspicious:
public static DateTime Create(object/*!*/ self, long seconds, long microseconds)
MRI actually uses a default protocol for Fixnum for the parameters:
class C
def respond_to? name
puts name
true
end
def to_int
123
end
end
Time.at(C.new, 1.2) #=> to_int
Time.at(C.new, 1000000000) #=> to_int
Tomas
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Daniele Alessandri
Sent: Sunday, August 23, 2009 1:20 PM
To: [email protected]
Subject: Re: [Ironruby-core] Core Review: Time and IO#open fixes
On Sun, Aug 23, 2009 at 15:15, Daniele Alessandri<[email protected]> wrote:
[...]
> *
> http://github.com/nrk/ironruby/commit/48a4a02b5b47d61f2f7a3f3887ea4bf02d63edb4
> Miscellaneous fixes to Time:
[...]
Just noticed the wrong link :-/ Here is the correct one:
http://github.com/nrk/ironruby/commit/fb55ffcfb7193eba537eb4aba98c3d55871006d6
--
Daniele Alessandri
http://www.clorophilla.net/blog/
http://twitter.com/JoL1hAHN
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core