ruby-changes:18025
From: yugui <ko1@a...>
Date: Thu, 2 Dec 2010 17:08:20 +0900 (JST)
Subject: [ruby-changes:18025] Ruby:r30049 (ruby_1_9_2): merges r29518 from trunk into ruby_1_9_2.
yugui 2010-12-02 17:07:41 +0900 (Thu, 02 Dec 2010) New Revision: 30049 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30049 Log: merges r29518 from trunk into ruby_1_9_2. -- * class.c (rb_define_{class,module}_id_under): register to be marked, which probably are defined and used internally. Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/class.c branches/ruby_1_9_2/test/ruby/test_class.rb branches/ruby_1_9_2/version.h Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 30048) +++ ruby_1_9_2/ChangeLog (revision 30049) @@ -1,3 +1,8 @@ +Sun Oct 17 10:40:17 2010 Nobuyoshi Nakada <nobu@r...> + + * class.c (rb_define_{class,module}_id_under): register to be + marked, which probably are defined and used internally. + Sat Oct 16 11:10:55 2010 Masaki Suketa <masaki.suketa@n...> * ext/win32ole/win32ole.c (ole_encoding2cp): set codepage 20936 Index: ruby_1_9_2/class.c =================================================================== --- ruby_1_9_2/class.c (revision 30048) +++ ruby_1_9_2/class.c (revision 30049) @@ -524,6 +524,7 @@ rb_set_class_path_string(klass, outer, rb_id2str(id)); rb_const_set(outer, id, klass); rb_class_inherited(super, klass); + rb_gc_register_mark_object(klass); return klass; } @@ -590,6 +591,7 @@ module = rb_define_module_id(id); rb_const_set(outer, id, module); rb_set_class_path_string(module, outer, rb_id2str(id)); + rb_gc_register_mark_object(module); return module; } Index: ruby_1_9_2/version.h =================================================================== --- ruby_1_9_2/version.h (revision 30048) +++ ruby_1_9_2/version.h (revision 30049) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 79 +#define RUBY_PATCHLEVEL 80 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 Index: ruby_1_9_2/test/ruby/test_class.rb =================================================================== --- ruby_1_9_2/test/ruby/test_class.rb (revision 30048) +++ ruby_1_9_2/test/ruby/test_class.rb (revision 30049) @@ -236,4 +236,8 @@ copy.send(:include, mod) assert_equal("mod#foo", copy.new.foo) end + + def test_nested_class_removal + assert_normal_exit('File.__send__(:remove_const, :Stat); at_exit{File.stat(".")}; GC.start') + end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/