Actions
Bug #608
closedduplicated when clause
Bug #608:
duplicated when clause
Description
=begin
遠藤です。
when 節に同じ値があるときの挙動が 1.8 と 1.9 で異なるようです。
$ ruby18 -e '
case 1
when 1 then p :foo
when 1 then p :bar
end
'
:foo
$ ruby19 -e '
case 1
when 1 then p :foo
when 1 then p :bar
end
'
:bar
1.9 のバグではないかと思います。
以下のパッチをコミットしてもいいでしょうか。
Index: compile.c¶
--- compile.c (revision 19604)
+++ compile.c (working copy)
@@ -1349,7 +1349,9 @@
rb_compile_error(RSTRING_PTR(iseq->filename), iobj->line_no,
"unknown label");
}
--
Yusuke ENDOH mame@tsg.ne.jp
=end
Actions