From: "shevegen (markus heiler)" Date: 2012-04-09T17:48:18+09:00 Subject: [ruby-core:44215] [ruby-trunk - Feature #5716] duplicated when clause is ignored -> Report which clause it is specifically. Issue #5716 has been updated by shevegen (markus heiler). Hi Koichi Sasada! I have not tested it yet (will do so at the end of this week), but I believe it will help me. Thank you! :) ---------------------------------------- Feature #5716: duplicated when clause is ignored -> Report which clause it is specifically. https://bugs.ruby-lang.org/issues/5716#change-25742 Author: shevegen (markus heiler) Status: Assigned Priority: Low Assignee: ko1 (Koichi Sasada) Category: Target version: In latest Ruby 1.9.3, if you have warnings enabled, you get information like this here: foobar.rb:24: warning: duplicated when clause is ignored This error comes from the file: compile.c rb_compile_warning(RSTRING_PTR(iseq->filename), iobj->line_no, "duplicated when clause is ignored"); This is called, it seems, when the prior function fails: rb_hash_aset(map, obj, INT2FIX(lobj->position - (pos+len))); As a user of Ruby, the warning should be better. Rather than: foobar.rb:24: warning: duplicated when clause is ignored I would like to see: foobar.rb:24: warning: duplicated when clause 'foo' is ignored. This way, I can scan through the file with the case/when structure and correct this error. But right now, if you have a very long case/when structure, you have no idea WHICH clause is duplicated. The warning message just vaguely says that there is, and this is not very helpful information. -- http://bugs.ruby-lang.org/