[前][次][番号順一覧][スレッド一覧]

ruby-changes:31153

From: nobu <ko1@a...>
Date: Thu, 10 Oct 2013 11:11:44 +0900 (JST)
Subject: [ruby-changes:31153] nobu:r43232 (trunk): vm.c: hide singleton class of frozen-core

nobu	2013-10-10 11:11:37 +0900 (Thu, 10 Oct 2013)

  New Revision: 43232

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43232

  Log:
    vm.c: hide singleton class of frozen-core
    
    * vm.c (Init_VM): hide also the singleton class of frozen-core, not
      only frozen-core itself.

  Modified files:
    trunk/ChangeLog
    trunk/vm.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43231)
+++ ChangeLog	(revision 43232)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Oct 10 11:11:33 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* vm.c (Init_VM): hide also the singleton class of frozen-core, not
+	  only frozen-core itself.
+
 Thu Oct 10 06:02:08 2013  Koichi Sasada  <ko1@a...>
 
 	* test/ruby/test_rand.rb: fix r43224. local variable `e' is
Index: vm.c
===================================================================
--- vm.c	(revision 43231)
+++ vm.c	(revision 43232)
@@ -2285,6 +2285,9 @@ Init_VM(void) https://github.com/ruby/ruby/blob/trunk/vm.c#L2285
     rb_define_method_id(klass, idProc, rb_block_proc, 0);
     rb_define_method_id(klass, idLambda, rb_block_lambda, 0);
     rb_obj_freeze(fcore);
+    RBASIC_CLEAR_CLASS(klass);
+    RCLASS_SET_SUPER(klass, 0);
+    rb_obj_freeze(klass);
     rb_gc_register_mark_object(fcore);
     rb_mRubyVMFrozenCore = fcore;
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]