diff --git a/ChangeLog b/ChangeLog index ce8676a3b7..1481bc064d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Apr 14 14:58:14 2016 Nobuyoshi Nakada + + * 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 * 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: