diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-14 05:58:16 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-14 05:58:16 +0000 |
commit | 31a3a862d6bd87817e494d60c3e8eb8a1025e5d2 (patch) | |
tree | d27167c08fd461b22d174b0c7d8b5118aaf54ec4 | |
parent | 06ccd6846d4220cb2037b08d7bd68fa3594c9bc3 (diff) |
tkutil.c: ary can be nil
* ext/tk/tkutil/tkutil.c (tk_hash_kv): the third argument can be
nil not only an Array. reported by @windwiny at
https://github.com/ruby/ruby/commit/cdaa94e#commitcomment-17096618
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ext/tk/tkutil/tkutil.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Thu Apr 14 14:58:14 2016 Nobuyoshi Nakada <[email protected]> + + * ext/tk/tkutil/tkutil.c (tk_hash_kv): the third argument can be + nil not only an Array. reported by @windwiny at + https://github.com/ruby/ruby/commit/cdaa94e#commitcomment-17096618 + Thu Apr 14 14:28:55 2016 cremno phobia <[email protected]> * cont.c (fiber_initialize_machine_stack_context): fix wrong diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c index 3b1d3c5ecf..249ed57448 100644 --- a/ext/tk/tkutil/tkutil.c +++ b/ext/tk/tkutil/tkutil.c @@ -804,7 +804,7 @@ tk_hash_kv(argc, argv, self) switch(argc) { case 3: ary = argv[2]; - Check_Type(ary, T_ARRAY); + if (!NIL_P(ary)) Check_Type(ary, T_ARRAY); case 2: enc_flag = argv[1]; case 1: |