diff --git a/ChangeLog b/ChangeLog index 1216146cab..87540c879c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Aug 22 10:26:59 2007 Yukihiro Matsumoto + + * time.c (time_succ): Time#succ should return a time object in the + same timezone mode to the original. [ruby-talk:260256] + Wed Aug 22 10:24:00 2007 Yukihiro Matsumoto * numeric.c (fix_pow): integer power calculation: 0**n => 0, diff --git a/time.c b/time.c index f1719b6d44..c749020737 100644 --- a/time.c +++ b/time.c @@ -1397,9 +1397,14 @@ time_succ(time) VALUE time; { struct time_object *tobj; + int gmt; GetTimeval(time, tobj); - return rb_time_new(tobj->tv.tv_sec + 1, tobj->tv.tv_usec); + gmt = tobj->gmt; + time = rb_time_new(tobj->tv.tv_sec + 1, tobj->tv.tv_usec); + GetTimeval(time, tobj); + tobj->gmt = gmt; + return time; } /* diff --git a/version.h b/version.h index 40ff75d16c..319cbe2294 100644 --- a/version.h +++ b/version.h @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2007-08-22" #define RUBY_VERSION_CODE 186 #define RUBY_RELEASE_CODE 20070822 -#define RUBY_PATCHLEVEL 68 +#define RUBY_PATCHLEVEL 69 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8