1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
shyouhei 2007-08-22 01:28:12 +00:00
parent d1992916e0
commit f25a57b3ef
3 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Wed Aug 22 10:26:59 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* 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 <matz@ruby-lang.org>
* numeric.c (fix_pow): integer power calculation: 0**n => 0,

7
time.c
View file

@ -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;
}
/*

View file

@ -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