diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-04-10 06:39:02 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-04-10 06:39:02 +0000 |
commit | 6da0604df71d66b7484e77b92e5c13154664b06e (patch) | |
tree | 1b5e865683e4464fac30c95d9603129527b8db6f /compile.c | |
parent | 2eb5d1dea4d9a604405f6725ef967a450218408d (diff) | |
download | ruby-6da0604df71d66b7484e77b92e5c13154664b06e.tar.gz |
* compile.c (iseq_set_sequence): show a hint if there are duplicated
"when" clauses. [ruby-core:41502] [ruby-trunk - Feature #5716]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1454,8 +1454,9 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor) 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); |