From: Tomoaki NISHIYAMA Date: 2011-06-08T10:33:58+09:00 Subject: [ruby-dev:43670] Re: DateTime.new! and DateTime.jd >> 次に[ruby-core:36802]の方は >> >> DateTime.jd raises 'invalid fraction' when called with more than one argument >> >> これはつまり、「DateTimeのfractionがゼロでないときに、さらに >> 時間や秒を指定することは意味がないのでエラーである」というこ >> とだと推測しました。正しいですか? >> >> [En] >> The newser version of DateTime checks adding hour|minute to >> DateTime already have fraction of a day. > > 議論の半分以下しかわからないですが、これは > > The newer version of DateTime does not allow to add hours/minutes to DateTime objects which already have a fraction of a day. > > の意味でしょうか。 Perhaps, this is not the case. The discussion is on arguments of jd; that is、 how to specify the time at initialization and not whether addition to the object is allowed or not. jdのほうは jd(jd=0, h=0, min=0, s=0, of=0, sg=ITALY) ということになっているので、 DateTime.jd(Rational(39014323, 16), 0) と DateTime.jd(Rational(39014323, 16)) が同じでないというのは若干予想に会わない話で、 non 0なh, min, ...を指定したときだけエラーに するという考え方もあるんじゃないかと思います。 The initial bug report was on the difference of DateTime.jd(Rational(39014323, 16), 0) and DateTime.jd(Rational(39014323, 16)) Because jd is documented as jd(jd=0, h=0, min=0, s=0, of=0, sg=ITALY) The difference does not meet to the expectation. Perhaps, it might be meaningful to raise error only if non-0 h, min etc is specified along with fraction date. Best regards -- Tomoaki NISHIYAMA