summaryrefslogtreecommitdiffstats
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
commit5793a55dd9f74d4ce8c18f46f2ccf596046e6564 (patch)
treeac8333df2988012b718fbad399295a011b809252 /numeric.c
parentbcf66657d1fa0947af5254135387927ddd438536 (diff)
downloadruby-5793a55dd9f74d4ce8c18f46f2ccf596046e6564.tar.gz
ruby-5793a55dd9f74d4ce8c18f46f2ccf596046e6564.tar.xz
ruby-5793a55dd9f74d4ce8c18f46f2ccf596046e6564.zip
* 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: http://svn.ruby-lang.org/repos/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 cb176fe96..6503e2604 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);
}
/*