mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Revert "Elaborated EOF char message a little"
This reverts commit 6eaac7cfac
.
This commit is contained in:
parent
7d463e360b
commit
ba5b51ca59
3 changed files with 5 additions and 5 deletions
2
parse.y
2
parse.y
|
@ -6209,7 +6209,7 @@ lex_goto_eol(struct parser_params *p)
|
||||||
for (; pcur < pend; pcur++) {
|
for (; pcur < pend; pcur++) {
|
||||||
const char *eof = eof_char(*pcur);
|
const char *eof = eof_char(*pcur);
|
||||||
if (eof) {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -722,7 +722,7 @@ x = __ENCODING__
|
||||||
|
|
||||||
def test_embedded_rd_warning
|
def test_embedded_rd_warning
|
||||||
[["\0", "\\0"], ["\C-d", "^D"], ["\C-z", "^Z"]].each do |eof, mesg|
|
[["\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\n#{eof}\n=end")}
|
||||||
assert_warning(mesg) {eval("=begin#{eof}\n=end")}
|
assert_warning(mesg) {eval("=begin#{eof}\n=end")}
|
||||||
assert_warning(mesg) {eval("=begin\n=end#{eof}\n")}
|
assert_warning(mesg) {eval("=begin\n=end#{eof}\n")}
|
||||||
|
|
|
@ -944,9 +944,9 @@ eom
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_warning_for_eof_in_comment
|
def test_warning_for_eof_in_comment
|
||||||
assert_warning(/encountered EOF char\(\\0\)/) {eval("#\0")}
|
assert_warning(/encountered \\0/) {eval("#\0")}
|
||||||
assert_warning(/encountered EOF char\(\^D\)/) {eval("#\C-d")}
|
assert_warning(/encountered \^D/) {eval("#\C-d")}
|
||||||
assert_warning(/encountered EOF char\(\^Z\)/) {eval("#\C-z")}
|
assert_warning(/encountered \^Z/) {eval("#\C-z")}
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_unexpected_fraction
|
def test_unexpected_fraction
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue