Revert "Elaborated EOF char message a little"

This reverts commit 6eaac7cfac.
This commit is contained in:
NARUSE, Yui 2019-11-11 17:37:14 +09:00
Родитель 7d463e360b
Коммит ba5b51ca59
3 изменённых файлов: 5 добавлений и 5 удалений

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

@ -6209,7 +6209,7 @@ lex_goto_eol(struct parser_params *p)
for (; pcur < pend; pcur++) {
const char *eof = eof_char(*pcur);
if (eof) {
rb_warning1("encountered EOF char(%s) in comment, just ignored in this version", WARN_S(eof));
rb_warning1("encountered %s in comment, just ignored in this version", WARN_S(eof));
break;
}
}

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

@ -722,7 +722,7 @@ x = __ENCODING__
def test_embedded_rd_warning
[["\0", "\\0"], ["\C-d", "^D"], ["\C-z", "^Z"]].each do |eof, mesg|
mesg = /encountered EOF char\(#{Regexp.quote(mesg)}\)/
mesg = /encountered #{Regexp.quote(mesg)}/
assert_warning(mesg) {eval("=begin\n#{eof}\n=end")}
assert_warning(mesg) {eval("=begin#{eof}\n=end")}
assert_warning(mesg) {eval("=begin\n=end#{eof}\n")}

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

@ -944,9 +944,9 @@ eom
end
def test_warning_for_eof_in_comment
assert_warning(/encountered EOF char\(\\0\)/) {eval("#\0")}
assert_warning(/encountered EOF char\(\^D\)/) {eval("#\C-d")}
assert_warning(/encountered EOF char\(\^Z\)/) {eval("#\C-z")}
assert_warning(/encountered \\0/) {eval("#\0")}
assert_warning(/encountered \^D/) {eval("#\C-d")}
assert_warning(/encountered \^Z/) {eval("#\C-z")}
end
def test_unexpected_fraction