ruby-changes:43329
From: nagachika <ko1@a...>
Date: Tue, 14 Jun 2016 03:46:35 +0900 (JST)
Subject: [ruby-changes:43329] nagachika:r55403 (ruby_2_3): merge revision(s) 55182: [Backport #12389]
nagachika 2016-06-14 03:46:30 +0900 (Tue, 14 Jun 2016) New Revision: 55403 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55403 Log: merge revision(s) 55182: [Backport #12389] * variable.c (rb_local_constants_i): exclude hidden constants. [ruby-core:75575] [Bug #12389] Modified directories: branches/ruby_2_3/ Modified files: branches/ruby_2_3/ChangeLog branches/ruby_2_3/test/ruby/test_module.rb branches/ruby_2_3/variable.c branches/ruby_2_3/version.h Index: ruby_2_3/variable.c =================================================================== --- ruby_2_3/variable.c (revision 55402) +++ ruby_2_3/variable.c (revision 55403) @@ -2370,7 +2370,9 @@ sv_i(st_data_t k, st_data_t v, st_data_t https://github.com/ruby/ruby/blob/trunk/ruby_2_3/variable.c#L2370 static int rb_local_constants_i(st_data_t const_name, st_data_t const_value, st_data_t ary) { - rb_ary_push((VALUE)ary, ID2SYM((ID)const_name)); + if (rb_is_const_id(const_name)) { + rb_ary_push((VALUE)ary, ID2SYM((ID)const_name)); + } return ST_CONTINUE; } Index: ruby_2_3/version.h =================================================================== --- ruby_2_3/version.h (revision 55402) +++ ruby_2_3/version.h (revision 55403) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1 #define RUBY_VERSION "2.3.2" #define RUBY_RELEASE_DATE "2016-06-14" -#define RUBY_PATCHLEVEL 127 +#define RUBY_PATCHLEVEL 128 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 6 Index: ruby_2_3/test/ruby/test_module.rb =================================================================== --- ruby_2_3/test/ruby/test_module.rb (revision 55402) +++ ruby_2_3/test/ruby/test_module.rb (revision 55403) @@ -603,6 +603,8 @@ class TestModule < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/ruby/test_module.rb#L603 const_set(:X, 123) end assert_equal(false, klass.class_eval { Module.constants }.include?(:X)) + + assert_equal(false, Complex.constants(false).include?(:compatible)) end module M1 Index: ruby_2_3/ChangeLog =================================================================== --- ruby_2_3/ChangeLog (revision 55402) +++ ruby_2_3/ChangeLog (revision 55403) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1 +Tue Jun 14 03:34:27 2016 Nobuyoshi Nakada <nobu@r...> + + * variable.c (rb_local_constants_i): exclude hidden constants. + [ruby-core:75575] [Bug #12389] + Tue Jun 14 03:25:14 2016 Benoit Daloze <eregontp@g...> * insns.def (defineclass): Also raise an error when redeclaring the Property changes on: ruby_2_3 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r55182 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/