[前][次][番号順一覧][スレッド一覧]

ruby-changes:42501

From: nobu <ko1@a...>
Date: Thu, 14 Apr 2016 14:01:40 +0900 (JST)
Subject: [ruby-changes:42501] nobu:r54575 (trunk): tkutil.c: ary can be nil

nobu	2016-04-14 14:58:16 +0900 (Thu, 14 Apr 2016)

  New Revision: 54575

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54575

  Log:
    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

  Modified files:
    trunk/ChangeLog
    trunk/ext/tk/tkutil/tkutil.c
Index: ext/tk/tkutil/tkutil.c
===================================================================
--- ext/tk/tkutil/tkutil.c	(revision 54574)
+++ ext/tk/tkutil/tkutil.c	(revision 54575)
@@ -804,7 +804,7 @@ tk_hash_kv(argc, argv, self) https://github.com/ruby/ruby/blob/trunk/ext/tk/tkutil/tkutil.c#L804
     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:
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 54574)
+++ ChangeLog	(revision 54575)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Apr 14 14:58:14 2016  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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  <cremno@m...>
 
 	* cont.c (fiber_initialize_machine_stack_context): fix wrong

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]