diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-20 20:44:49 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-20 20:44:49 +0000 |
commit | f262909cba89361e786a7e097908d5923fff61c3 (patch) | |
tree | bbb28192f5115f6394ab8e30aa5abaccf4096d28 /hash.c | |
parent | 32ee210345c56347476bb2b2a166fafaf1f61e3f (diff) |
* hash.c (rb_hash_flatten): use NUM2INT to raise TypeError on 32bit
platform. it's introduced by r42039
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2223,7 +2223,7 @@ rb_hash_flatten(int argc, VALUE *argv, VALUE hash) ary = rb_ary_new_capa(RHASH_SIZE(hash) * 2); rb_hash_foreach(hash, flatten_i, ary); if (argc) { - int level = FIX2INT(*argv) - 1; + int level = NUM2INT(*argv) - 1; if (level > 0) { *argv = INT2FIX(level); rb_funcall2(ary, rb_intern("flatten!"), argc, argv); |