summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 84d9eb3aec..8bba586dfb 100644
--- a/hash.c
+++ b/hash.c
@@ -418,6 +418,12 @@ to_hash(VALUE hash)
return rb_convert_type(hash, T_HASH, "Hash", "to_hash");
}
+VALUE
+rb_check_hash_type(VALUE hash)
+{
+ return rb_check_convert_type(hash, T_HASH, "Hash", "to_hash");
+}
+
/*
* call-seq:
* Hash.try_convert(obj) -> hash or nil
@@ -432,7 +438,7 @@ to_hash(VALUE hash)
static VALUE
rb_hash_s_try_convert(VALUE dummy, VALUE hash)
{
- return rb_check_convert_type(hash, T_HASH, "Hash", "to_hash");
+ return rb_check_hash_type(hash);
}
static int