diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-17 08:39:39 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-17 08:39:39 +0000 |
commit | abfcded30cfe2071517c3869e868c7a9cb373479 (patch) | |
tree | e9016a51baf74be579821db1219c6a09dfd89719 | |
parent | 3f3a618d3ace3e805be8a0889cd9434d1afbc22d (diff) | |
download | ruby-abfcded30cfe2071517c3869e868c7a9cb373479.tar.gz |
* gc.c: fix example of ObjectSpace.define_finalizer in overview
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | gc.c | 12 |
2 files changed, 7 insertions, 9 deletions
@@ -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 @@ -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 - * */ /* |