diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-17 02:27:38 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-17 02:27:38 +0000 |
| commit | fba629dfe38d9950dcbee95603dbff754235fece (patch) | |
| tree | 8593a93244c96b098dd6611ee7e4dfe2c7ba9957 /numeric.c | |
| parent | bce9cbf14543e0ba2ba350483d25ded22c7609ec (diff) | |
| download | ruby-fba629dfe38d9950dcbee95603dbff754235fece.tar.gz ruby-fba629dfe38d9950dcbee95603dbff754235fece.tar.xz ruby-fba629dfe38d9950dcbee95603dbff754235fece.zip | |
* re.c (rb_reg_initialize_m): should raise exception instead of
compile error. [ruby-core:03755]
* string.c (rb_str_splice): move rb_str_modify() after
StringValue(), which may alter the receiver. [ruby-dev:24878]
* error.c (rb_error_frozen): now raise RuntimeError instead of
TypeError.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
| -rw-r--r-- | numeric.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -716,6 +716,7 @@ flo_divmod(x, y) VALUE x, y; { double fy, div, mod; + volatile VALUE a, b; switch (TYPE(y)) { case T_FIXNUM: @@ -731,9 +732,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); } /* |
