ruby-changes:21973
From: nobu <ko1@a...>
Date: Tue, 13 Dec 2011 06:34:13 +0900 (JST)
Subject: [ruby-changes:21973] nobu:r34022 (trunk): * parse.y (parser_magic_comment): should pass the proper value.
nobu 2011-12-13 06:29:53 +0900 (Tue, 13 Dec 2011) New Revision: 34022 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34022 Log: * parse.y (parser_magic_comment): should pass the proper value. [ruby-dev:44984][Bug #5753] Modified files: trunk/ChangeLog trunk/parse.y trunk/test/ripper/test_parser_events.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 34021) +++ ChangeLog (revision 34022) @@ -1,3 +1,8 @@ +Tue Dec 13 06:29:39 2011 Nobuyoshi Nakada <nobu@r...> + + * 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@r...> * vm_insnhelper.c (vm_yield_setup_block_args): splat single Index: parse.y =================================================================== --- parse.y (revision 34021) +++ parse.y (revision 34022) @@ -6550,6 +6550,7 @@ } } while (++p < magic_comments + numberof(magic_comments)); #else + str_copy(val, vbeg, vend - vbeg); dispatch2(magic_comment, name, val); #endif } Index: test/ripper/test_parser_events.rb =================================================================== --- test/ripper/test_parser_events.rb (revision 34021) +++ test/ripper/test_parser_events.rb (revision 34022) @@ -592,8 +592,8 @@ def test_magic_comment thru_magic_comment = false - parse('# -*- foo:bar -*-', :on_magic_comment) {thru_magic_comment = true} - assert_equal true, thru_magic_comment + parse('# -*- bug-5753: ruby-dev:44984 -*-', :on_magic_comment) {|*x|thru_magic_comment = x} + assert_equal [:on_magic_comment, "bug_5753", "ruby-dev:44984"], thru_magic_comment end def test_method_add_block -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/