mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
parse.y: fix yyerror message
* parse.y (parser_yyerror): show the error line even if the error is at the end. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
42d9712e78
commit
bc44acb5a3
2 changed files with 7 additions and 3 deletions
|
@ -953,6 +953,11 @@ x = __ENCODING__
|
|||
end
|
||||
end
|
||||
|
||||
def test_yyerror_at_eol
|
||||
assert_syntax_error(" 0b", /\^/)
|
||||
assert_syntax_error(" 0b\n", /\^/)
|
||||
end
|
||||
|
||||
=begin
|
||||
def test_past_scope_variable
|
||||
assert_warning(/past scope/) {catch {|tag| eval("BEGIN{throw tag}; tap {a = 1}; a")}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue