ruby-changes:43857
From: usa <ko1@a...>
Date: Tue, 16 Aug 2016 14:56:30 +0900 (JST)
Subject: [ruby-changes:43857] usa:r55930 (ruby_2_2): merge revision(s) 55705: [Backport #12345]
usa 2016-08-16 14:56:26 +0900 (Tue, 16 Aug 2016) New Revision: 55930 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55930 Log: merge revision(s) 55705: [Backport #12345] * variable.c (rb_local_constants_i): exclude private constants when excluding inherited constants too. [Bug #12345] Modified directories: branches/ruby_2_2/ Modified files: branches/ruby_2_2/ChangeLog branches/ruby_2_2/test/ruby/test_module.rb branches/ruby_2_2/variable.c branches/ruby_2_2/version.h Index: ruby_2_2/version.h =================================================================== --- ruby_2_2/version.h (revision 55929) +++ ruby_2_2/version.h (revision 55930) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1 #define RUBY_VERSION "2.2.6" #define RUBY_RELEASE_DATE "2016-08-16" -#define RUBY_PATCHLEVEL 358 +#define RUBY_PATCHLEVEL 359 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 8 Index: ruby_2_2/test/ruby/test_module.rb =================================================================== --- ruby_2_2/test/ruby/test_module.rb (revision 55929) +++ ruby_2_2/test/ruby/test_module.rb (revision 55930) @@ -1360,6 +1360,8 @@ class TestModule < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_2/test/ruby/test_module.rb#L1360 def test_constants_with_private_constant assert_not_include(::TestModule.constants, :PrivateClass) + assert_not_include(::TestModule.constants(true), :PrivateClass) + assert_not_include(::TestModule.constants(false), :PrivateClass) end def test_toplevel_private_constant Index: ruby_2_2/ChangeLog =================================================================== --- ruby_2_2/ChangeLog (revision 55929) +++ ruby_2_2/ChangeLog (revision 55930) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1 +Tue Aug 16 14:54:14 2016 Nobuyoshi Nakada <nobu@r...> + + * variable.c (rb_local_constants_i): exclude private constants + when excluding inherited constants too. [Bug #12345] + Tue Aug 16 14:43:00 2016 Masatoshi SEKI <m_seki@m...> * lib/drb/timeridconv.rb: don't use keeper thread. [Bug #12342] Index: ruby_2_2/variable.c =================================================================== --- ruby_2_2/variable.c (revision 55929) +++ ruby_2_2/variable.c (revision 55930) @@ -1999,7 +1999,7 @@ sv_i(st_data_t k, st_data_t v, st_data_t https://github.com/ruby/ruby/blob/trunk/ruby_2_2/variable.c#L1999 static int rb_local_constants_i(st_data_t const_name, st_data_t const_value, st_data_t ary) { - if (rb_is_const_id(const_name)) { + if (rb_is_const_id(const_name) && !RB_CONST_PRIVATE_P((rb_const_entry_t *)const_value)) { rb_ary_push((VALUE)ary, ID2SYM((ID)const_name)); } return ST_CONTINUE; Property changes on: ruby_2_2 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r55705 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/