From f262909cba89361e786a7e097908d5923fff61c3 Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 20 Jul 2013 20:44:49 +0000 Subject: * 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 --- hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hash.c') diff --git a/hash.c b/hash.c index 447d73feb1..3c448c0b0e 100644 --- a/hash.c +++ b/hash.c @@ -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); -- cgit v1.2.3