summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-15 21:26:42 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-15 21:26:42 +0000
commit379478e0c2c00cda7a587b1d2ef74b8995bee312 (patch)
treef434c96872fa5d185bd8b9bca0f81c64b3b3697c
parenta406475bcbecae14693201adafa2ad2e0cdfc8fc (diff)
* 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_5@13017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--time.c7
-rw-r--r--version.h2
3 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3d98a63..88baa72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Aug 16 06:25:48 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]
+
Thu Aug 16 06:24:39 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* numeric.c (fix_pow): integer power calculation: 0**n => 0,
diff --git a/time.c b/time.c
index 8350a3a..9627ddb 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 7b433e7..acfaf68 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2007-08-16"
#define RUBY_VERSION_CODE 185
#define RUBY_RELEASE_CODE 20070816
-#define RUBY_PATCHLEVEL 77
+#define RUBY_PATCHLEVEL 78
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8