summaryrefslogtreecommitdiff
path: root/ext/-test-/hash
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-23 14:18:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-23 14:18:32 +0000
commitd4c22161f391d66ae6191c36f5f2ff965f97c3f6 (patch)
tree2855023fda5c2eba19466b34c3134bb68ded271c /ext/-test-/hash
parentca7835bec6714f0704a32a25d2c23e465f3c10b2 (diff)
test/-ext-/hash/test_delete.rb: assert deleted values
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/-test-/hash')
-rw-r--r--ext/-test-/hash/delete.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/-test-/hash/delete.c b/ext/-test-/hash/delete.c
index de54e36..c0489e0 100644
--- a/ext/-test-/hash/delete.c
+++ b/ext/-test-/hash/delete.c
@@ -4,11 +4,11 @@ static VALUE
hash_delete(VALUE hash, VALUE key)
{
VALUE ret = rb_hash_delete(hash, key);
- return ret == Qundef ? Qfalse : Qtrue;
+ return ret == Qundef ? Qnil : rb_ary_new_from_values(1, &ret);
}
void
Init_delete(VALUE klass)
{
- rb_define_method(klass, "delete", hash_delete, 1);
+ rb_define_method(klass, "delete!", hash_delete, 1);
}