зеркало из https://github.com/github/ruby.git
* parse.y (yylex): should dispatch scan-event even when follows
just after delayed-token. [ruby-dev:37855] [Bug #1071] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
aa3c6d4dd2
Коммит
114f01bd9d
|
@ -1,3 +1,8 @@
|
||||||
|
Sun Aug 16 23:58:22 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* parse.y (yylex): should dispatch scan-event even when follows
|
||||||
|
just after delayed-token. [ruby-dev:37855] [Bug #1071]
|
||||||
|
|
||||||
Sun Aug 16 22:20:16 2009 Tadayoshi Funaba <tadf@dotrb.org>
|
Sun Aug 16 22:20:16 2009 Tadayoshi Funaba <tadf@dotrb.org>
|
||||||
|
|
||||||
* lib/date/format.rb: reverted.
|
* lib/date/format.rb: reverted.
|
||||||
|
|
1
parse.y
1
parse.y
|
@ -7612,7 +7612,6 @@ yylex(void *p)
|
||||||
#ifdef RIPPER
|
#ifdef RIPPER
|
||||||
if (!NIL_P(parser->delayed)) {
|
if (!NIL_P(parser->delayed)) {
|
||||||
ripper_dispatch_delayed_token(parser, t);
|
ripper_dispatch_delayed_token(parser, t);
|
||||||
return t;
|
|
||||||
}
|
}
|
||||||
if (t != 0)
|
if (t != 0)
|
||||||
ripper_dispatch_scan_event(parser, t);
|
ripper_dispatch_scan_event(parser, t);
|
||||||
|
|
|
@ -63,6 +63,11 @@ class TestRipper_ScannerEvents < Test::Unit::TestCase
|
||||||
[[2, 0], :on_tstring_content, "heredoc\n"],
|
[[2, 0], :on_tstring_content, "heredoc\n"],
|
||||||
[[3, 0], :on_heredoc_end, "EOS"]],
|
[[3, 0], :on_heredoc_end, "EOS"]],
|
||||||
Ripper.lex("<<EOS\nheredoc\nEOS")
|
Ripper.lex("<<EOS\nheredoc\nEOS")
|
||||||
|
assert_equal [[[1, 0], :on_regexp_beg, "/"],
|
||||||
|
[[1, 1], :on_tstring_content, "foo\n"],
|
||||||
|
[[2, 0], :on_tstring_content, "bar"],
|
||||||
|
[[2, 3], :on_regexp_end, "/"]],
|
||||||
|
Ripper.lex("/foo\nbar/")
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_location
|
def test_location
|
||||||
|
|
Загрузка…
Ссылка в новой задаче