diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-03 12:01:13 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-03 12:01:13 +0000 |
commit | b80d5f14df01ac626a42668f40ede3724e4425ef (patch) | |
tree | 67b9d3d515a70d0f5c739511c53157568f7f3377 /hash.c | |
parent | 292c39098da3d6c9036eabcb9f8a5f7b07c86ab0 (diff) |
* hash.c (rb_check_hash_type): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 |