* numeric.c (flo_divmod): protect float values from GC by
assignment to local variables. [ruby-dev:24873] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a74375b05f
commit
02f848f9a4
@ -1,3 +1,8 @@
|
|||||||
|
Tue Nov 16 23:45:07 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* numeric.c (flo_divmod): protect float values from GC by
|
||||||
|
assignment to local variables. [ruby-dev:24873]
|
||||||
|
|
||||||
Tue Nov 16 14:31:54 2004 Michael Neumann <mneumann@ruby-lang.org>
|
Tue Nov 16 14:31:54 2004 Michael Neumann <mneumann@ruby-lang.org>
|
||||||
|
|
||||||
* test/xmlrpc/*: imported and refactored original test cases.
|
* test/xmlrpc/*: imported and refactored original test cases.
|
||||||
|
9
hash.c
9
hash.c
@ -1554,8 +1554,10 @@ rb_hash_update_block_i(key, value, hash)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* hsh.merge!(other_hash) => hsh
|
* hsh.merge!(other_hash) => hsh
|
||||||
* hsh.update(other_hash) => hsh
|
* hsh.update(other_hash) => hsh
|
||||||
|
* hsh.merge!(other_hash){|key, oldval, newval| block} => hsh
|
||||||
|
* hsh.update(other_hash){|key, oldval, newval| block} => hsh
|
||||||
*
|
*
|
||||||
* Adds the contents of <i>other_hash</i> to <i>hsh</i>, overwriting
|
* Adds the contents of <i>other_hash</i> to <i>hsh</i>, overwriting
|
||||||
* entries with duplicate keys with those from <i>other_hash</i>.
|
* entries with duplicate keys with those from <i>other_hash</i>.
|
||||||
@ -1581,7 +1583,8 @@ rb_hash_update(hash1, hash2)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* hsh.merge(other_hash) -> a_hash
|
* hsh.merge(other_hash) -> a_hash
|
||||||
|
* hsh.merge(other_hash){|key, oldval, newval| block} -> a_hash
|
||||||
*
|
*
|
||||||
* Returns a new hash containing the contents of <i>other_hash</i> and
|
* Returns a new hash containing the contents of <i>other_hash</i> and
|
||||||
* the contents of <i>hsh</i>, overwriting entries in <i>hsh</i> with
|
* the contents of <i>hsh</i>, overwriting entries in <i>hsh</i> with
|
||||||
|
@ -731,7 +731,9 @@ flo_divmod(x, y)
|
|||||||
return rb_num_coerce_bin(x, y);
|
return rb_num_coerce_bin(x, y);
|
||||||
}
|
}
|
||||||
flodivmod(RFLOAT(x)->value, fy, &div, &mod);
|
flodivmod(RFLOAT(x)->value, fy, &div, &mod);
|
||||||
return rb_assoc_new(rb_float_new(div), rb_float_new(mod));
|
x = rb_float_new(div);
|
||||||
|
y = rb_float_new(mod);
|
||||||
|
return rb_assoc_new(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user