1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Prefer the dedecated conversion function

This commit is contained in:
Nobuyoshi Nakada 2022-01-08 12:49:39 +09:00
parent 54c91042ed
commit 32a0d9dd4b
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

2
enum.c
View file

@ -1224,7 +1224,7 @@ enum_tally(int argc, VALUE *argv, VALUE obj)
{
VALUE hash;
if (rb_check_arity(argc, 0, 1)) {
hash = rb_convert_type(argv[0], T_HASH, "Hash", "to_hash");
hash = rb_to_hash_type(argv[0]);
rb_check_frozen(hash);
}
else {