ruby-changes:50659
From: usa <ko1@a...>
Date: Mon, 19 Mar 2018 00:16:56 +0900 (JST)
Subject: [ruby-changes:50659] usa:r62822 (ruby_2_3): merge revision(s) 60160: [Backport #13998]
usa 2018-03-19 00:16:52 +0900 (Mon, 19 Mar 2018) New Revision: 62822 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62822 Log: merge revision(s) 60160: [Backport #13998] parse.y: token info with BOM * parse.y (parser_prepare): set token_info_enabled flag first, before returning at BOM. [ruby-dev:50288] [Bug #13998] Modified directories: branches/ruby_2_3/ Modified files: branches/ruby_2_3/ChangeLog branches/ruby_2_3/parse.y branches/ruby_2_3/test/ruby/test_rubyoptions.rb branches/ruby_2_3/version.h Index: ruby_2_3/version.h =================================================================== --- ruby_2_3/version.h (revision 62821) +++ ruby_2_3/version.h (revision 62822) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1 #define RUBY_VERSION "2.3.7" #define RUBY_RELEASE_DATE "2018-03-19" -#define RUBY_PATCHLEVEL 422 +#define RUBY_PATCHLEVEL 423 #define RUBY_RELEASE_YEAR 2018 #define RUBY_RELEASE_MONTH 3 Index: ruby_2_3/parse.y =================================================================== --- ruby_2_3/parse.y (revision 62821) +++ ruby_2_3/parse.y (revision 62822) @@ -7364,6 +7364,7 @@ static void https://github.com/ruby/ruby/blob/trunk/ruby_2_3/parse.y#L7364 parser_prepare(struct parser_params *parser) { int c = nextc(); + parser->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose); switch (c) { case '#': if (peek('!')) parser->has_shebang = 1; @@ -7384,7 +7385,6 @@ parser_prepare(struct parser_params *par https://github.com/ruby/ruby/blob/trunk/ruby_2_3/parse.y#L7385 pushback(c); parser->enc = rb_enc_get(lex_lastline); deferred_nodes = 0; - parser->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose); } #define IS_ARG() IS_lex_state(EXPR_ARG_ANY) Index: ruby_2_3/test/ruby/test_rubyoptions.rb =================================================================== --- ruby_2_3/test/ruby/test_rubyoptions.rb (revision 62821) +++ ruby_2_3/test/ruby/test_rubyoptions.rb (revision 62822) @@ -406,6 +406,16 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/ruby/test_rubyoptions.rb#L406 t.puts " end" t.flush assert_in_out_err(["-w", t.path], "", [], [], '[ruby-core:25442]') + + err = ["#{t.path}:2: warning: mismatched indentations at 'end' with 'begin' at 1"] + t.rewind + t.truncate(0) + t.print "\u{feff}" + t.puts "begin" + t.puts " end" + t.flush + assert_in_out_err(["-w", t.path], "", [], err) + assert_in_out_err(["-wr", t.path, "-e", ""], "", [], err) } end Index: ruby_2_3/ChangeLog =================================================================== --- ruby_2_3/ChangeLog (revision 62821) +++ ruby_2_3/ChangeLog (revision 62822) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1 +Mon Mar 19 00:16:28 2018 Nobuyoshi Nakada <nobu@r...> + + parse.y: token info with BOM + + * parse.y (parser_prepare): set token_info_enabled flag first, before + returning at BOM. [Bug #13998] + Mon Mar 19 00:06:43 2018 Hiroshi Shirosaki <h.shirosaki@g...> io.c: fix segfault with closing socket on Windows Index: ruby_2_3 =================================================================== --- ruby_2_3 (revision 62821) +++ ruby_2_3 (revision 62822) Property changes on: ruby_2_3 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /trunk:r60160 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/