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

ruby-changes:39115

From: zzak <ko1@a...>
Date: Thu, 9 Jul 2015 09:27:22 +0900 (JST)
Subject: [ruby-changes:39115] zzak:r51196 (trunk): * parse.y: Improve duplicate key warning with patch by @andremedeiros

zzak	2015-07-09 09:27:04 +0900 (Thu, 09 Jul 2015)

  New Revision: 51196

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

  Log:
    * parse.y: Improve duplicate key warning with patch by @andremedeiros
      [Fix GH-938] https://github.com/ruby/ruby/pull/938 [Bug #11327]

  Modified files:
    trunk/ChangeLog
    trunk/parse.y
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51195)
+++ ChangeLog	(revision 51196)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Jul  9 09:25:50 2015  Zachary Scott  <e@z...>
+
+        * parse.y: Improve duplicate key warning with patch by @andremedeiros
+          [Fix GH-938] https://github.com/ruby/ruby/pull/938 [Bug #11327]
+
 Wed Jul  8 07:43:01 2015  SHIBATA Hiroshi  <hsbt@r...>
 
 	* lib/csv.rb: typo fix [ci skip][fix GH-958] Patch by @henrik
Index: parse.y
===================================================================
--- parse.y	(revision 51195)
+++ parse.y	(revision 51196)
@@ -9934,8 +9934,8 @@ remove_duplicate_keys(struct parser_para https://github.com/ruby/ruby/blob/trunk/parse.y#L9934
 	if (nd_type(head) == NODE_LIT &&
 	    st_lookup(literal_keys, (key = head->nd_lit), &data)) {
 	    rb_compile_warn(ruby_sourcefile, nd_line((NODE *)data),
-			    "duplicated key at line %d ignored: %+"PRIsVALUE,
-			    nd_line(head), head->nd_lit);
+			    "key %+"PRIsVALUE" is duplicated and overwritten on line %d",
+			    head->nd_lit, nd_line(head));
 	    head = ((NODE *)data)->nd_next;
 	    head->nd_head = block_append(head->nd_head, value->nd_head);
 	}

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

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