summaryrefslogtreecommitdiff
path: root/ext/-test-/hash
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-24 02:53:37 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-24 02:53:37 +0000
commit9c6eaad72372576a3d351bc6044e74814718c137 (patch)
treeb39b1af99ea3ffaf4fbf14eac36dd6d06cc6aca3 /ext/-test-/hash
parent0cd829c3393a143ff72fa56ea4040a82e2ecf1e0 (diff)
* hash.c (rb_hash_delete): return Qnil if there are no corresponding
entry. [Bug #10623] * hash.c (rb_hash_delete_entry): try delete and return Qundef if there are no corresponding entry. * internal.h: add rb_hash_delete_entry()'s declaration. * symbol.c: use rb_hash_delete_entry(). * thread.c: use rb_hash_delete_entry(). * ext/-test-/hash/delete.c: use rb_hash_delete_entry(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/-test-/hash')
-rw-r--r--ext/-test-/hash/delete.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/-test-/hash/delete.c b/ext/-test-/hash/delete.c
index c0489e0..1a7c373 100644
--- a/ext/-test-/hash/delete.c
+++ b/ext/-test-/hash/delete.c
@@ -3,7 +3,7 @@
static VALUE
hash_delete(VALUE hash, VALUE key)
{
- VALUE ret = rb_hash_delete(hash, key);
+ VALUE ret = rb_hash_delete_entry(hash, key);
return ret == Qundef ? Qnil : rb_ary_new_from_values(1, &ret);
}