diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-04 21:48:47 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-04 21:48:47 +0000 |
| commit | 9e0cd0c4525231d48afe8e0b3bea698921efe7b8 (patch) | |
| tree | 387a84b4659f23c25555e0787ef197101bea7d73 | |
| parent | 1a1c4ba8d4598c8b64c2cc291d26143a01a966d3 (diff) | |
| download | ruby-9e0cd0c4525231d48afe8e0b3bea698921efe7b8.tar.gz ruby-9e0cd0c4525231d48afe8e0b3bea698921efe7b8.tar.xz ruby-9e0cd0c4525231d48afe8e0b3bea698921efe7b8.zip | |
* time.c (time_to_s): variable declaration after an execution
statement.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | time.c | 5 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Tue Sep 5 06:47:22 2006 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * time.c (time_to_s): variable declaration after an execution + statement. + Tue Sep 5 05:49:41 2006 Nobuyoshi Nakada <nobu@ruby-lang.org> * file.c (path_check_0): check if sticky bit is set on parent @@ -1201,6 +1201,9 @@ time_to_s(VALUE time) time_t off; char buf2[32]; char sign = '+'; +#if !defined(HAVE_STRUCT_TM_TM_GMTOFF) + VALUE tmp; +#endif GetTimeval(time, tobj); if (tobj->tm_got == 0) { @@ -1209,7 +1212,7 @@ time_to_s(VALUE time) #if defined(HAVE_STRUCT_TM_TM_GMTOFF) off = tobj->tm.tm_gmtoff; #else - VALUE tmp = time_utc_offset(time); + tmp = time_utc_offset(time); off = NUM2INT(tmp); #endif if (off < 0) { |
