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): check duplicated when clauses.

[ruby-dev:36616]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2008-09-28 13:15:34 +00:00
parent 0e395a6002
commit f2aabd1802
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Sun Sep 28 22:05:07 2008 Yusuke Endoh <mame@tsg.ne.jp>
* compile.c (iseq_set_sequence): check duplicated when clause.
[ruby-dev:36616]
Sun Sep 28 19:04:03 2008 Tadayoshi Funaba <tadf@dotrb.org>
* test/date/*.rb: imported a date test suite ruby 1.9 limited ed.

View file

@ -1349,7 +1349,12 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
rb_compile_error(RSTRING_PTR(iseq->filename), iobj->line_no,
"unknown label");
}
rb_hash_aset(map, obj, INT2FIX(lobj->position - (pos+len)));
if (!st_lookup(rb_hash_tbl(map), obj, 0)) {
rb_hash_aset(map, obj, INT2FIX(lobj->position - (pos+len)));
}
else {
rb_warning("duplicated when clause is ignored");
}
}
generated_iseq[pos + 1 + j] = map;
iseq_add_mark_object(iseq, map);