ruby-changes:23227
From: ko1 <ko1@a...>
Date: Tue, 10 Apr 2012 15:39:13 +0900 (JST)
Subject: [ruby-changes:23227] ko1:r35277 (trunk): * compile.c (iseq_set_sequence): show a hint if there are duplicated
ko1 2012-04-10 15:39:02 +0900 (Tue, 10 Apr 2012) New Revision: 35277 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35277 Log: * compile.c (iseq_set_sequence): show a hint if there are duplicated "when" clauses. [ruby-core:41502] [ruby-trunk - Feature #5716] Modified files: trunk/ChangeLog trunk/compile.c Index: ChangeLog =================================================================== --- ChangeLog (revision 35276) +++ ChangeLog (revision 35277) @@ -1,3 +1,8 @@ +Tue Apr 10 15:35:21 2012 Koichi Sasada <ko1@a...> + + * compile.c (iseq_set_sequence): show a hint if there are duplicated + "when" clauses. [ruby-core:41502] [ruby-trunk - Feature #5716] + Tue Apr 10 09:57:00 2012 Eric Hodel <drbrain@s...> * string.c (rb_str_split_m): Documented behavior of split on the empty Index: compile.c =================================================================== --- compile.c (revision 35276) +++ compile.c (revision 35277) @@ -1454,8 +1454,9 @@ rb_hash_aset(map, obj, INT2FIX(lobj->position - (pos+len))); } else { + int n = i/2 + 1; rb_compile_warning(RSTRING_PTR(iseq->filename), iobj->line_no, - "duplicated when clause is ignored"); + "duplicated when clause (#%d) is ignored", n); } } hide_obj(map); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/