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 | b2d8a7c8fce07109d46b998122aba2b04a843cc6 (patch) | |
| tree | 3dc98cff592742831c7e36ec1456a0ead1158ed0 | |
| parent | 285bf5af03e9271c1222dde5986dd8ee2432445a (diff) | |
| download | ruby-b2d8a7c8fce07109d46b998122aba2b04a843cc6.tar.gz ruby-b2d8a7c8fce07109d46b998122aba2b04a843cc6.tar.xz ruby-b2d8a7c8fce07109d46b998122aba2b04a843cc6.zip | |
* time.c (time_to_s): variable declaration after an execution
statement.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@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:56:51 2006 Nobuyoshi Nakada <nobu@ruby-lang.org> * numeric.c (flo_hash): improve collision. fixed: [ruby-dev:29352] @@ -1256,6 +1256,9 @@ time_to_s(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) { @@ -1264,7 +1267,7 @@ time_to_s(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) { |
