summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-18 03:47:14 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-18 03:47:14 +0000
commitdb8a49614ff65c6e85416e495f9c375fef021942 (patch)
treeac8333df2988012b718fbad399295a011b809252 /numeric.c
parent1fff70f8b3d22adfa82f989080ecbdc32480b4ef (diff)
* process.c (proc_getpgrp): prohibit for $SAFE=2.
[ruby-dev:24899] * process.c (get_pid): ditto. [ruby-dev:24904] * process.c (get_ppid): ditto. * array.c (rb_ary_delete): defer rb_ary_modify() until actual modification. [ruby-dev:24901] * parse.y (newline_node): should not use FL_SET. [ruby-dev:24874] * parse.y (string_content): should not use FL_UNSET. * node.h (NODE_NEWLINE): remove unused bit to utilize flag field in nodes. * string.c (rb_str_splice): move rb_str_modify() after StringValue(), which may alter the receiver. [ruby-dev:24878] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/numeric.c b/numeric.c
index cb176fe96b..6503e26042 100644
--- a/numeric.c
+++ b/numeric.c
@@ -715,6 +715,7 @@ flo_divmod(x, y)
VALUE x, y;
{
double fy, div, mod;
+ volatile VALUE a, b;
switch (TYPE(y)) {
case T_FIXNUM:
@@ -730,9 +731,9 @@ flo_divmod(x, y)
return rb_num_coerce_bin(x, y);
}
flodivmod(RFLOAT(x)->value, fy, &div, &mod);
- x = rb_float_new(div);
- y = rb_float_new(mod);
- return rb_assoc_new(x, y);
+ a = rb_float_new(div);
+ b = rb_float_new(mod);
+ return rb_assoc_new(a, b);
}
/*