summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-26 07:46:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-26 07:46:24 +0000
commitffa20cf154591dbef2761ef7c61af534b4908f4f (patch)
tree1c233b2016badeab678de7f0a2b130915a3b28bc /string.c
parent9ac51c29930fa92a32186e7c217fa219915487c6 (diff)
use rb_check_hash_type
* class.c (rb_scan_args): use rb_check_hash_type. * process.c (rb_exec_getargs): ditto. * sprintf.c (get_hash): ditto. * string.c (rb_str_sub_bang, str_gsub): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/string.c b/string.c
index f2abc4fcf3..c97bfc8047 100644
--- a/string.c
+++ b/string.c
@@ -3616,7 +3616,7 @@ rb_str_sub_bang(int argc, VALUE *argv, VALUE str)
}
else {
repl = argv[1];
- hash = rb_check_convert_type(argv[1], T_HASH, "Hash", "to_hash");
+ hash = rb_check_hash_type(argv[1]);
if (NIL_P(hash)) {
StringValue(repl);
}
@@ -3768,7 +3768,7 @@ str_gsub(int argc, VALUE *argv, VALUE str, int bang)
break;
case 2:
repl = argv[1];
- hash = rb_check_convert_type(argv[1], T_HASH, "Hash", "to_hash");
+ hash = rb_check_hash_type(argv[1]);
if (NIL_P(hash)) {
StringValue(repl);
}