[前][次][番号順一覧][スレッド一覧]

ruby-changes:47391

From: nagachika <ko1@a...>
Date: Sat, 5 Aug 2017 01:13:24 +0900 (JST)
Subject: [ruby-changes:47391] nagachika:r59507 (ruby_2_4): merge revision(s) 59374: [Backport #13755]

nagachika	2017-08-05 01:13:13 +0900 (Sat, 05 Aug 2017)

  New Revision: 59507

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59507

  Log:
    merge revision(s) 59374: [Backport #13755]
    
    compile.c: restore stack at return
    
    * compile.c (iseq_compile_each0): restore the stack depth after
      return to the previous depth, to fix the stack depth at
      returning from rescue iseq.  [ruby-core:82108] [Bug #13755]

  Modified directories:
    branches/ruby_2_4/
  Modified files:
    branches/ruby_2_4/compile.c
    branches/ruby_2_4/test/ruby/test_syntax.rb
    branches/ruby_2_4/version.h
Index: ruby_2_4/test/ruby/test_syntax.rb
===================================================================
--- ruby_2_4/test/ruby/test_syntax.rb	(revision 59506)
+++ ruby_2_4/test/ruby/test_syntax.rb	(revision 59507)
@@ -986,6 +986,7 @@ eom https://github.com/ruby/ruby/blob/trunk/ruby_2_4/test/ruby/test_syntax.rb#L986
       raise((return; "should not raise"))
       begin raise; ensure return; end; self
       begin raise; ensure return; end and self
+      nil&defined?0--begin e=no_method_error(); return; 0;end
     end;
     all_assertions(feature4840) do |a|
       code.each_line do |s|
Index: ruby_2_4/version.h
===================================================================
--- ruby_2_4/version.h	(revision 59506)
+++ ruby_2_4/version.h	(revision 59507)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/version.h#L1
 #define RUBY_VERSION "2.4.2"
 #define RUBY_RELEASE_DATE "2017-08-05"
-#define RUBY_PATCHLEVEL 172
+#define RUBY_PATCHLEVEL 173
 
 #define RUBY_RELEASE_YEAR 2017
 #define RUBY_RELEASE_MONTH 8
Index: ruby_2_4/compile.c
===================================================================
--- ruby_2_4/compile.c	(revision 59506)
+++ ruby_2_4/compile.c	(revision 59507)
@@ -5480,9 +5480,12 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/compile.c#L5480
 	    enum iseq_type parent_type;
 
 	    if (type == ISEQ_TYPE_TOP || type == ISEQ_TYPE_MAIN) {
+		LABEL *splabel = NEW_LABEL(line);
+		ADD_LABEL(ret, splabel);
 		ADD_ADJUST(ret, line, 0);
 		ADD_INSN(ret, line, putnil);
 		ADD_INSN(ret, line, leave);
+		ADD_ADJUST_RESTORE(ret, splabel);
 	    }
 	    else if ((type == ISEQ_TYPE_RESCUE || type == ISEQ_TYPE_ENSURE) &&
 		     parent_iseq &&
Index: ruby_2_4
===================================================================
--- ruby_2_4	(revision 59506)
+++ ruby_2_4	(revision 59507)

Property changes on: ruby_2_4
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,1 ##
   Merged /trunk:r59374

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]