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

ruby-changes:29301

From: eregon <ko1@a...>
Date: Mon, 17 Jun 2013 17:39:50 +0900 (JST)
Subject: [ruby-changes:29301] eregon:r41353 (trunk): * gc.c: fix example of ObjectSpace.define_finalizer in overview

eregon	2013-06-17 17:39:39 +0900 (Mon, 17 Jun 2013)

  New Revision: 41353

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

  Log:
    * gc.c: fix example of ObjectSpace.define_finalizer in overview

  Modified files:
    trunk/ChangeLog
    trunk/gc.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41352)
+++ ChangeLog	(revision 41353)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Jun 17 17:38:24 2013  Benoit Daloze  <eregontp@g...>
+
+	* gc.c: fix example of ObjectSpace.define_finalizer in overview
+
 Mon Jun 17 16:59:53 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/tk/tkutil/tkutil.c: use rb_sprintf(), rb_id2str(), and
Index: gc.c
===================================================================
--- gc.c	(revision 41352)
+++ gc.c	(revision 41353)
@@ -5349,22 +5349,16 @@ rb_gcdebug_sentinel(VALUE obj, const cha https://github.com/ruby/ruby/blob/trunk/gc.c#L5349
  *  called when a specific object is about to be destroyed by garbage
  *  collection.
  *
- *     include ObjectSpace
- *
  *     a = "A"
  *     b = "B"
- *     c = "C"
  *
- *     define_finalizer(a, proc {|id| puts "Finalizer one on #{id}" })
- *     define_finalizer(a, proc {|id| puts "Finalizer two on #{id}" })
- *     define_finalizer(b, proc {|id| puts "Finalizer three on #{id}" })
+ *     ObjectSpace.define_finalizer(a, proc {|id| puts "Finalizer one on #{id}" })
+ *     ObjectSpace.define_finalizer(b, proc {|id| puts "Finalizer two on #{id}" })
  *
  *  _produces:_
  *
- *     Finalizer three on 537763470
+ *     Finalizer two on 537763470
  *     Finalizer one on 537763480
- *     Finalizer two on 537763480
- *
  */
 
 /*

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

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