ruby-changes:43308
From: nagachika <ko1@a...>
Date: Sun, 12 Jun 2016 02:26:23 +0900 (JST)
Subject: [ruby-changes:43308] nagachika:r55382 (ruby_2_3): merge revision(s) 54893: [Backport #10763]
nagachika 2016-06-12 02:26:02 +0900 (Sun, 12 Jun 2016) New Revision: 55382 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55382 Log: merge revision(s) 54893: [Backport #10763] * parse.y (new_if_gen): set newline flag to NODE_IF to trace all if/elsif statements. [ruby-core:67720] [Bug #10763] 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_settracefunc.rb branches/ruby_2_3/version.h Index: ruby_2_3/parse.y =================================================================== --- ruby_2_3/parse.y (revision 55381) +++ ruby_2_3/parse.y (revision 55382) @@ -9947,7 +9947,7 @@ new_if_gen(struct parser_params *parser, https://github.com/ruby/ruby/blob/trunk/ruby_2_3/parse.y#L9947 { if (!cc) return right; cc = cond0(parser, cc); - return NEW_IF(cc, left, right); + return newline_node(NEW_IF(cc, left, right)); } static NODE* Index: ruby_2_3/version.h =================================================================== --- ruby_2_3/version.h (revision 55381) +++ ruby_2_3/version.h (revision 55382) @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1 #define RUBY_VERSION "2.3.2" -#define RUBY_RELEASE_DATE "2016-05-21" -#define RUBY_PATCHLEVEL 120 +#define RUBY_RELEASE_DATE "2016-06-12" +#define RUBY_PATCHLEVEL 121 #define RUBY_RELEASE_YEAR 2016 -#define RUBY_RELEASE_MONTH 5 -#define RUBY_RELEASE_DAY 21 +#define RUBY_RELEASE_MONTH 6 +#define RUBY_RELEASE_DAY 12 #include "ruby/version.h" Index: ruby_2_3/test/ruby/test_settracefunc.rb =================================================================== --- ruby_2_3/test/ruby/test_settracefunc.rb (revision 55381) +++ ruby_2_3/test/ruby/test_settracefunc.rb (revision 55382) @@ -1399,6 +1399,25 @@ class TestSetTraceFunc < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/ruby/test_settracefunc.rb#L1399 assert_equal [__LINE__ - 3, __LINE__ - 2], lines, 'Bug #10449' end + def test_elsif_line_event + bug10763 = '[ruby-core:67720] [Bug #10763]' + lines = [] + line = nil + + TracePoint.new(:line){|tp| + next unless target_thread? + lines << tp.lineno if line + }.enable{ + line = __LINE__ + if !line + 1 + elsif line + 2 + end + } + assert_equal [line+1, line+3, line+4], lines, bug10763 + end + class Bug10724 def initialize loop{return} Index: ruby_2_3/ChangeLog =================================================================== --- ruby_2_3/ChangeLog (revision 55381) +++ ruby_2_3/ChangeLog (revision 55382) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1 +Sun Jun 12 01:59:33 2016 Nobuyoshi Nakada <nobu@r...> + + * parse.y (new_if_gen): set newline flag to NODE_IF to trace all + if/elsif statements. [ruby-core:67720] [Bug #10763] + Sun May 15 02:33:52 2016 Nobuyoshi Nakada <nobu@r...> * lib/mkmf.rb (pkg_config): use xsystem consistently to set up Property changes on: ruby_2_3 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r54893 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/