ruby-changes:18244
From: yugui <ko1@a...>
Date: Mon, 20 Dec 2010 22:30:54 +0900 (JST)
Subject: [ruby-changes:18244] Ruby:r30267 (ruby_1_9_2): merges r29951 from trunk into ruby_1_9_2.
yugui 2010-12-20 22:23:09 +0900 (Mon, 20 Dec 2010) New Revision: 30267 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30267 Log: merges r29951 from trunk into ruby_1_9_2. -- * time.c (leap_year_v_p): fixed typo. [ruby-dev:42631] Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/test/ruby/test_time.rb branches/ruby_1_9_2/time.c branches/ruby_1_9_2/version.h Index: ruby_1_9_2/time.c =================================================================== --- ruby_1_9_2/time.c (revision 30266) +++ ruby_1_9_2/time.c (revision 30267) @@ -853,7 +853,7 @@ static struct vtm *localtimew(wideval_t timew, struct vtm *result); static int leap_year_p(long y); -#define leap_year_v_p(y) leap_year_p(NUM2LONG(mod(v, INT2FIX(400)))) +#define leap_year_v_p(y) leap_year_p(NUM2LONG(mod((y), INT2FIX(400)))) #ifdef HAVE_GMTIME_R #define rb_gmtime_r(t, tm) gmtime_r(t, tm) Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 30266) +++ ruby_1_9_2/ChangeLog (revision 30267) @@ -1,3 +1,7 @@ +Sat Nov 27 18:08:18 2010 Nobuyoshi Nakada <nobu@r...> + + * time.c (leap_year_v_p): fixed typo. [ruby-dev:42631] + Fri Nov 26 09:48:45 2010 NAKAMURA Usaku <usa@r...> * re.c (rb_reg_initialize_str): should succeed the taint status from Index: ruby_1_9_2/version.h =================================================================== --- ruby_1_9_2/version.h (revision 30266) +++ ruby_1_9_2/version.h (revision 30267) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 107 +#define RUBY_PATCHLEVEL 108 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 Index: ruby_1_9_2/test/ruby/test_time.rb =================================================================== --- ruby_1_9_2/test/ruby/test_time.rb (revision 30266) +++ ruby_1_9_2/test/ruby/test_time.rb (revision 30267) @@ -19,6 +19,10 @@ assert_equal(Time.utc(2000,2,10), Time.new(2000,2,9, 13,0,0, -3600*11)) assert_equal(Time.utc(2000,2,10), Time.new(2000,2,10, 11,0,0, "+11:00")) assert_equal(Rational(1,2), Time.new(2000,2,10, 11,0,5.5, "+11:00").subsec) + bug4090 = '[ruby-dev:42631]' + tm = [2001,2,28,23,59,30] + t = Time.new(*tm, "-12:00") + assert_equal([2001,2,28,23,59,30,-43200], [t.year, t.month, t.mday, t.hour, t.min, t.sec, t.gmt_offset], bug4090) end def test_time_add() -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/