1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
ko1 2012-04-10 06:39:02 +00:00
parent 2eb5d1dea4
commit 6da0604df7
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Tue Apr 10 15:35:21 2012 Koichi Sasada <ko1@atdot.net>
* 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@segment7.net>
* string.c (rb_str_split_m): Documented behavior of split on the empty

View file

@ -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);