ruby-changes:43282
From: usa <ko1@a...>
Date: Fri, 10 Jun 2016 16:14:48 +0900 (JST)
Subject: [ruby-changes:43282] usa:r55356 (ruby_2_2): merge revision(s) 55182: [Backport #12389]
usa 2016-06-10 16:14:44 +0900 (Fri, 10 Jun 2016) New Revision: 55356 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55356 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_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/variable.c =================================================================== --- ruby_2_2/variable.c (revision 55355) +++ ruby_2_2/variable.c (revision 55356) @@ -1999,7 +1999,9 @@ 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) { - 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_2/version.h =================================================================== --- ruby_2_2/version.h (revision 55355) +++ ruby_2_2/version.h (revision 55356) @@ -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-06-10" -#define RUBY_PATCHLEVEL 331 +#define RUBY_PATCHLEVEL 332 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 6 Index: ruby_2_2/test/ruby/test_module.rb =================================================================== --- ruby_2_2/test/ruby/test_module.rb (revision 55355) +++ ruby_2_2/test/ruby/test_module.rb (revision 55356) @@ -589,6 +589,8 @@ class TestModule < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_2/test/ruby/test_module.rb#L589 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_2/ChangeLog =================================================================== --- ruby_2_2/ChangeLog (revision 55355) +++ ruby_2_2/ChangeLog (revision 55356) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1 +Fri Jun 10 16:12:58 2016 Nobuyoshi Nakada <nobu@r...> + + * variable.c (rb_local_constants_i): exclude hidden constants. + [ruby-core:75575] [Bug #12389] + Fri Jun 10 16:10:23 2016 NARUSE, Yui <naruse@r...> * regcomp.c (compile_length_tree): return error code immediately Property changes on: ruby_2_2 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r55182 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/