summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--gc.c12
2 files changed, 7 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index b30f799f96..49a853672a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Jun 17 17:38:24 2013 Benoit Daloze <eregontp@gmail.com>
+
+ * gc.c: fix example of ObjectSpace.define_finalizer in overview
+
Mon Jun 17 16:59:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/tk/tkutil/tkutil.c: use rb_sprintf(), rb_id2str(), and
diff --git a/gc.c b/gc.c
index c9c3b52dae..dcb956ac0d 100644
--- a/gc.c
+++ b/gc.c
@@ -5349,22 +5349,16 @@ rb_gcdebug_sentinel(VALUE obj, const char *name)
* 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
- *
*/
/*