ruby-changes:26419
From: usa <ko1@a...>
Date: Wed, 19 Dec 2012 21:19:42 +0900 (JST)
Subject: [ruby-changes:26419] usa:r38470 (ruby_1_9_3): merge revision(s) 38039: [Backport #7408]
usa 2012-12-19 21:19:29 +0900 (Wed, 19 Dec 2012) New Revision: 38470 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38470 Log: merge revision(s) 38039: [Backport #7408] * parse.y (parser_yylex): fix false usage of local variable, it cannot appear in fname state [ruby-core:49659] [Bug #7408] Modified directories: branches/ruby_1_9_3/ Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/parse.y branches/ruby_1_9_3/test/ruby/test_rubyoptions.rb branches/ruby_1_9_3/version.h Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 38469) +++ ruby_1_9_3/ChangeLog (revision 38470) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/ChangeLog#L1 +Wed Dec 19 21:15:29 2012 Nobuyoshi Nakada <nobu@r...> + + * parse.y (parser_yylex): fix false usage of local variable, it cannot + appear in fname state [ruby-core:49659] [Bug #7408] + Wed Dec 19 21:14:28 2012 Narihiro Nakamura <authornari@g...> * gc.c: return true or false. Patch by Dirkjan Bussink. [Bug #6821] Index: ruby_1_9_3/parse.y =================================================================== --- ruby_1_9_3/parse.y (revision 38469) +++ ruby_1_9_3/parse.y (revision 38470) @@ -7923,7 +7923,8 @@ parser_yylex(struct parser_params *parse https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/parse.y#L7923 ID ident = TOK_INTERN(!ENC_SINGLE(mb)); set_yylval_name(ident); - if (last_state != EXPR_DOT && is_local_id(ident) && lvar_defined(ident)) { + if (last_state != EXPR_DOT && last_state != EXPR_FNAME && + is_local_id(ident) && lvar_defined(ident)) { lex_state = EXPR_END; } } Index: ruby_1_9_3/version.h =================================================================== --- ruby_1_9_3/version.h (revision 38469) +++ ruby_1_9_3/version.h (revision 38470) @@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/version.h#L1 #define RUBY_VERSION "1.9.3" -#define RUBY_PATCHLEVEL 343 +#define RUBY_PATCHLEVEL 344 #define RUBY_RELEASE_DATE "2012-12-19" #define RUBY_RELEASE_YEAR 2012 Index: ruby_1_9_3/test/ruby/test_rubyoptions.rb =================================================================== --- ruby_1_9_3/test/ruby/test_rubyoptions.rb (revision 38469) +++ ruby_1_9_3/test/ruby/test_rubyoptions.rb (revision 38470) @@ -489,6 +489,8 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/test/ruby/test_rubyoptions.rb#L489 assert_in_out_err(["-we", "1.times do\n a=1\nend"], "", [], [], feature3446) assert_in_out_err(["-we", "def foo\n 1.times do\n a=1\n end\nend"], "", [], ["-e:3: warning: assigned but unused variable - a"], feature3446) assert_in_out_err(["-we", "def foo\n"" 1.times do |a| end\n""end"], "", [], []) + bug7408 = '[ruby-core:49659]' + assert_in_out_err(["-we", "def foo\n a=1\n :a\nend"], "", [], ["-e:2: warning: assigned but unused variable - a"], bug7408) end def test_shadowing_variable Property changes on: ruby_1_9_3 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r38039 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/