зеркало из https://github.com/github/ruby.git
* parse.y (parser_magic_comment): should pass the proper value.
[ruby-dev:44984][Bug #5753] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a3eaaf8967
Коммит
0f9662f366
|
@ -1,3 +1,8 @@
|
||||||
|
Tue Dec 13 06:29:39 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* parse.y (parser_magic_comment): should pass the proper value.
|
||||||
|
[ruby-dev:44984][Bug #5753]
|
||||||
|
|
||||||
Tue Dec 13 05:50:07 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Dec 13 05:50:07 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* vm_insnhelper.c (vm_yield_setup_block_args): splat single
|
* vm_insnhelper.c (vm_yield_setup_block_args): splat single
|
||||||
|
|
1
parse.y
1
parse.y
|
@ -6550,6 +6550,7 @@ parser_magic_comment(struct parser_params *parser, const char *str, long len)
|
||||||
}
|
}
|
||||||
} while (++p < magic_comments + numberof(magic_comments));
|
} while (++p < magic_comments + numberof(magic_comments));
|
||||||
#else
|
#else
|
||||||
|
str_copy(val, vbeg, vend - vbeg);
|
||||||
dispatch2(magic_comment, name, val);
|
dispatch2(magic_comment, name, val);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -592,8 +592,8 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_magic_comment
|
def test_magic_comment
|
||||||
thru_magic_comment = false
|
thru_magic_comment = false
|
||||||
parse('# -*- foo:bar -*-', :on_magic_comment) {thru_magic_comment = true}
|
parse('# -*- bug-5753: ruby-dev:44984 -*-', :on_magic_comment) {|*x|thru_magic_comment = x}
|
||||||
assert_equal true, thru_magic_comment
|
assert_equal [:on_magic_comment, "bug_5753", "ruby-dev:44984"], thru_magic_comment
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_method_add_block
|
def test_method_add_block
|
||||||
|
|
Загрузка…
Ссылка в новой задаче