summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-03 13:26:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-03 13:26:48 +0000
commit41c46ceade33bc3cc0a0142d968d379a6e472db9 (patch)
tree430e68995865ad8f4a67ed68e41965e88e106075
parent5f075c2fdab5005fcc335c4edfda83ccc4f1d49c (diff)
* process.c (rb_proc_times): need to initialize first.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--process.c13
2 files changed, 9 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 663b0e4336..5d967cefee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Jan 3 22:26:07 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
+
+ * process.c (rb_proc_times): need to initialize first.
+
Thu Jan 02 11:01:20 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* eval.c (bmcall): arguments should be an array.
diff --git a/process.c b/process.c
index 41a00154ed..4b855ac3b9 100644
--- a/process.c
+++ b/process.c
@@ -1261,17 +1261,14 @@ rb_proc_times(obj)
# endif
#endif /* HZ */
struct tms buf;
- VALUE volatile utime = rb_float_new((double)buf.tms_utime / HZ);
- VALUE volatile stime = rb_float_new((double)buf.tms_stime / HZ);
- VALUE volatile cutime = rb_float_new((double)buf.tms_cutime / HZ);
- VALUE volatile sctime = rb_float_new((double)buf.tms_cstime / HZ);
+ volatile VALUE utime, stime, cutime, sctime;
times(&buf);
return rb_struct_new(S_Tms,
- utime,
- stime,
- cutime,
- sctime);
+ utime = rb_float_new((double)buf.tms_utime / HZ),
+ stime = rb_float_new((double)buf.tms_stime / HZ),
+ cutime = rb_float_new((double)buf.tms_cutime / HZ),
+ sctime = rb_float_new((double)buf.tms_cstime / HZ));
#else
rb_notimplement();
#endif