* parse.y (literal_concat0): tail can be nil. [ruby-dev:38980]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-08-02 12:04:43 +00:00
Родитель 3770ac98ff
Коммит 6a26b59600
3 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -1,3 +1,7 @@
Sun Aug 2 21:04:37 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (literal_concat0): tail can be nil. [ruby-dev:38980]
Sun Aug 2 20:09:07 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> Sun Aug 2 20:09:07 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* array.c (rb_ary_combination, rb_ary_product): prevent from GC. * array.c (rb_ary_combination, rb_ary_product): prevent from GC.

Просмотреть файл

@ -831,3 +831,8 @@ assert_normal_exit %q{
assert_equal 'ok', %q{ assert_equal 'ok', %q{
"#{}""#{}ok" "#{}""#{}ok"
}, '[ruby-dev:38968]' }, '[ruby-dev:38968]'
assert_equal 'ok', %q{
"o" "#{}k"
}, '[ruby-dev:38980]'

Просмотреть файл

@ -7782,6 +7782,7 @@ list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail)
static int static int
literal_concat0(struct parser_params *parser, VALUE head, VALUE tail) literal_concat0(struct parser_params *parser, VALUE head, VALUE tail)
{ {
if (NIL_P(tail)) return 1;
if (!rb_enc_compatible(head, tail)) { if (!rb_enc_compatible(head, tail)) {
compile_error(PARSER_ARG "string literal encodings differ (%s / %s)", compile_error(PARSER_ARG "string literal encodings differ (%s / %s)",
rb_enc_name(rb_enc_get(head)), rb_enc_name(rb_enc_get(head)),