Skip to content

Commit f25a57b

Browse files
committed
* time.c (time_succ): Time#succ should return a time object in the
same timezone mode to the original. [ruby-talk:260256] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent d199291 commit f25a57b

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Wed Aug 22 10:26:59 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
2+
3+
* time.c (time_succ): Time#succ should return a time object in the
4+
same timezone mode to the original. [ruby-talk:260256]
5+
16
Wed Aug 22 10:24:00 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
27

38
* numeric.c (fix_pow): integer power calculation: 0**n => 0,

time.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1397,9 +1397,14 @@ time_succ(time)
13971397
VALUE time;
13981398
{
13991399
struct time_object *tobj;
1400+
int gmt;
14001401

14011402
GetTimeval(time, tobj);
1402-
return rb_time_new(tobj->tv.tv_sec + 1, tobj->tv.tv_usec);
1403+
gmt = tobj->gmt;
1404+
time = rb_time_new(tobj->tv.tv_sec + 1, tobj->tv.tv_usec);
1405+
GetTimeval(time, tobj);
1406+
tobj->gmt = gmt;
1407+
return time;
14031408
}
14041409

14051410
/*

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define RUBY_RELEASE_DATE "2007-08-22"
33
#define RUBY_VERSION_CODE 186
44
#define RUBY_RELEASE_CODE 20070822
5-
#define RUBY_PATCHLEVEL 68
5+
#define RUBY_PATCHLEVEL 69
66

77
#define RUBY_VERSION_MAJOR 1
88
#define RUBY_VERSION_MINOR 8

0 commit comments

Comments
 (0)