mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ac521b96b6
commit
fe0fb03316
4 changed files with 29 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Jun 12 01:59:33 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* 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@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb (pkg_config): use xsystem consistently to set up
|
||||
|
|
2
parse.y
2
parse.y
|
@ -9947,7 +9947,7 @@ new_if_gen(struct parser_params *parser, NODE *cc, NODE *left, NODE *right)
|
|||
{
|
||||
if (!cc) return right;
|
||||
cc = cond0(parser, cc);
|
||||
return NEW_IF(cc, left, right);
|
||||
return newline_node(NEW_IF(cc, left, right));
|
||||
}
|
||||
|
||||
static NODE*
|
||||
|
|
|
@ -1399,6 +1399,25 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
|||
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}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#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"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue