Bug #15839 » mixed-encoding-heredoc-reverse-order-fix.patch
| parse.y | ||
|---|---|---|
|
} while (!whole_match_p(p, eos, len, indent));
|
||
|
str = STR_NEW3(tok(p), toklen(p), enc, func);
|
||
|
}
|
||
|
if (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN) {
|
||
|
parser_mixed_error(p, enc, p->enc);
|
||
|
}
|
||
|
dispatch_heredoc_end(p);
|
||
|
#ifdef RIPPER
|
||
|
str = ripper_new_yylval(p, ripper_token2eventid(tSTRING_CONTENT),
|
||
| test/ruby/test_syntax.rb | ||
|---|---|---|
|
\u1234
|
||
|
TEXT
|
||
|
HEREDOC
|
||
|
assert_syntax_error(<<-'HEREDOC', 'UTF-8 mixed within Windows-31J source')
|
||
|
#encoding: cp932
|
||
|
<<-TEXT
|
||
|
\u1234\xe9\x9d
|
||
|
TEXT
|
||
|
HEREDOC
|
||
|
assert_syntax_error(<<-'HEREDOC', 'UTF-8 mixed within Windows-31J source')
|
||
|
#encoding: cp932
|
||
|
<<-TEXT
|
||
|
\u1234
|
||
|
\xe9\x9d
|
||
|
TEXT
|
||
|
HEREDOC
|
||
|
end
|
||
|
def test_lineno_operation_brace_block
|
||