ruby-changes:17024
From: naruse <ko1@a...>
Date: Tue, 17 Aug 2010 15:19:10 +0900 (JST)
Subject: [ruby-changes:17024] Ruby:r29021 (trunk): * lib/date.rb: Re-revert the part of r28950.
naruse 2010-08-17 15:18:53 +0900 (Tue, 17 Aug 2010) New Revision: 29021 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29021 Log: * lib/date.rb: Re-revert the part of r28950. It reverted the part of r28619. Modified files: trunk/ChangeLog trunk/lib/date.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 29020) +++ ChangeLog (revision 29021) @@ -1,3 +1,8 @@ +Tue Aug 17 15:13:28 2010 NARUSE, Yui <naruse@r...> + + * lib/date.rb: Re-revert the part of r28950. + It reverted the part of r28619. + Tue Aug 17 13:00:07 2010 Tanaka Akira <akr@f...> * ext/pathname/pathname.c (path_dirname): Pathname#dirname translated @@ -243,7 +248,7 @@ ext/bigdecimal/extconf.rb: BASE and BASE_FIG are defined based on the size of BDIGIT. - * ext/bigdecimal/bigdecimal.c, ext/bigdecimal/bigdecimal.h: + * ext/bigdecimal/bigdecimal.c, ext/bigdecimal/bigdecimal.h: use BDIGIT for Real#frac. Tue Aug 10 15:19:45 2010 Kenta Murata <mrkn@m...> Index: lib/date.rb =================================================================== --- lib/date.rb (revision 29020) +++ lib/date.rb (revision 29021) @@ -470,7 +470,7 @@ end def jd_to_weeknum(jd, f=0, sg=GREGORIAN) # :nodoc: - y, m, d = jd_to_civil(jd, sg) + y, _, d = jd_to_civil(jd, sg) a = find_fdoy(y, sg) + 6 w, d = (jd - (a - ((a - f) + 1) % 7) + 7).divmod(7) return y, w, d @@ -486,7 +486,7 @@ end def jd_to_nth_kday(jd, sg=GREGORIAN) # :nodoc: - y, m, d = jd_to_civil(jd, sg) + y, m, = jd_to_civil(jd, sg) j = find_fdom(y, m, sg) return y, m, ((jd - j) / 7).floor + 1, jd_to_wday(jd) end @@ -645,7 +645,7 @@ d += 8 end if w < 0 - ny, nw, nd = + ny, nw, = jd_to_commercial(commercial_to_jd(y + 1, 1, 1, sg) + w * 7, sg) return unless ny == y w = nw @@ -660,7 +660,7 @@ d += 7 end if w < 0 - ny, nw, nd, nf = + ny, nw, = jd_to_weeknum(weeknum_to_jd(y + 1, 1, f, f, sg) + w * 7, f, sg) return unless ny == y w = nw @@ -677,7 +677,7 @@ if n < 0 ny, nm = (y * 12 + m).divmod(12) nm, = (nm + 1) .divmod(1) - ny, nm, nn, nk = + ny, nm, nn, = jd_to_nth_kday(nth_kday_to_jd(ny, nm, 1, k, sg) + n * 7, sg) return unless [ny, nm] == [y, m] n = nn -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/