ruby-changes:43701
From: nagachika <ko1@a...>
Date: Sat, 30 Jul 2016 11:26:40 +0900 (JST)
Subject: [ruby-changes:43701] nagachika:r55774 (ruby_2_3): merge revision(s) 55297: [Backport #12462]
nagachika 2016-07-30 11:26:30 +0900 (Sat, 30 Jul 2016) New Revision: 55774 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55774 Log: merge revision(s) 55297: [Backport #12462] * vm_insnhelper.c (vm_throw_start): check if the iseq is symbol proc, class definition should not be a symbol proc. [ruby-core:75856] [Bug #12462] Modified directories: branches/ruby_2_3/ Modified files: branches/ruby_2_3/ChangeLog branches/ruby_2_3/test/ruby/test_symbol.rb branches/ruby_2_3/version.h branches/ruby_2_3/vm_insnhelper.c Index: ruby_2_3/ChangeLog =================================================================== --- ruby_2_3/ChangeLog (revision 55773) +++ ruby_2_3/ChangeLog (revision 55774) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1 +Sat Jul 30 10:58:49 2016 Nobuyoshi Nakada <nobu@r...> + + * vm_insnhelper.c (vm_throw_start): check if the iseq is symbol + proc, class definition should not be a symbol proc. + [ruby-core:75856] [Bug #12462] + Mon Jul 11 22:35:00 2016 Kenta Murata <mrkn@m...> * bignum.c (rb_big_hash): make it public function to be available in Index: ruby_2_3/version.h =================================================================== --- ruby_2_3/version.h (revision 55773) +++ ruby_2_3/version.h (revision 55774) @@ -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-07-11" -#define RUBY_PATCHLEVEL 139 +#define RUBY_RELEASE_DATE "2016-07-30" +#define RUBY_PATCHLEVEL 140 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 7 -#define RUBY_RELEASE_DAY 11 +#define RUBY_RELEASE_DAY 30 #include "ruby/version.h" Index: ruby_2_3/vm_insnhelper.c =================================================================== --- ruby_2_3/vm_insnhelper.c (revision 55773) +++ ruby_2_3/vm_insnhelper.c (revision 55774) @@ -996,7 +996,9 @@ vm_throw_start(rb_thread_t *const th, rb https://github.com/ruby/ruby/blob/trunk/ruby_2_3/vm_insnhelper.c#L996 target_lep = lep; } - if (lep == target_lep && escape_cfp->iseq->body->type == ISEQ_TYPE_CLASS) { + if (lep == target_lep && + RUBY_VM_NORMAL_ISEQ_P(escape_cfp->iseq) && + escape_cfp->iseq->body->type == ISEQ_TYPE_CLASS) { in_class_frame = 1; target_lep = 0; } Index: ruby_2_3/test/ruby/test_symbol.rb =================================================================== --- ruby_2_3/test/ruby/test_symbol.rb (revision 55773) +++ ruby_2_3/test/ruby/test_symbol.rb (revision 55774) @@ -157,6 +157,15 @@ class TestSymbol < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/ruby/test_symbol.rb#L157 assert_equal(1, first, bug11594) end + private def return_from_proc + Proc.new { return 1 }.tap(&:call) + end + + def test_return_from_symbol_proc + bug12462 = '[ruby-core:75856] [Bug #12462]' + assert_equal(1, return_from_proc, bug12462) + end + def test_to_proc_for_hash_each bug11830 = '[ruby-core:72205] [Bug #11830]' assert_normal_exit(<<-'end;', bug11830) # do Property changes on: ruby_2_3 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r55297 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/