-- forwatable.rb $Release Version: 1.1 $ $Revision$ =begin = Forwardable クラスに対しメソッドの委譲機能を定義します. == 使い方 クラスに対してextendして使います. class Foo extend Forwardable def_delegators("@out", "printf", "print") def_delegators(:@in, :gets) def_delegator(:@contents, :[], "content_at") end f = Foo.new f.printf ... f.gets f.content_at(1) == メソッド --- Forwardable#def_instance_delegators(accessor, *methods) ((|methods|))で渡されたメソッドのリストを((|accessorに|))委譲する ようにします. --- Forwardable#def_instance_delegator(accessor, method, ali = method) ((||method|))で渡されたメソッドを((|accessor|))に委譲するようにし ます. ((|ali|))が引数として渡されたときは, メソッド((|ali|))が呼ば れたときには, ((|accessor|))に対し((|method|))を呼び出します. --- Forwardable#def_delegators(accessor, *methods) ((|Forwardable#def_instance_delegators|))の別名です. --- Forwardable#def_delegator(accessor, method, ali = method) ((|Forwardable#def_instance_delegator|))の別名です. = SingleForwardable オブジェクトに対し, メソッドの委譲機能を定義します. == 使い方 オブジェクトに対して((|extend|))して使います. g = Goo.new g.extend SingleForwardable g.def_delegator("@out", :puts) g.puts ... == メソッド --- SingleForwardable#def_singleton_delegators(accessor, *methods) ((|methods|))で渡されたメソッドのリストを((|accessor|))に委譲する ようにします. --- SingleForwardable#def_singleton_delegator(accessor, method, ali = method) ((|method|))で渡されたメソッドを((|accessor|))に委譲するようにしま す. ((|ali|))が引数として渡されたときは, メソッド((|ali|))が呼ばれ たときには, ((|accessor|))に対し((|method|))を呼び出します. --- SingleForwardable#def_delegators(accessor, *methods) ((|SingleForwardable#def_singleton_delegators|))の別名です. --- SingleForwardable#def_delegator(accessor, method, ali = method) ((|SingleForwardable#def_singleton_delegator|))の別名です. =end uby.git/commit/gc.h?h=ruby_3_3&id=fff1edf23ba28267bf57097c269f7fa87530e3fa'>commitdiff
path: root/gc.h
AgeCommit message (Expand)Author
2020-09-03Introduce Ractor mechanism for parallel executionKoichi Sasada
2020-08-14Enable arm64 optimizations that exist for power/x86 (#3393)AGSaidi
2020-01-23Rename RUBY_MARK_NO_PIN_UNLESS_NULL to RUBY_MARK_MOVABLE_UNLESS_NULL0x005c
2019-12-26decouple internal.h headers卜部昌平
2019-12-16gc.h: Add SET_MACHINE_STACK_END specific for Powerpc64 (#1767)Breno Leitao
2019-08-12Rename rb_gc_mark_no_pin -> rb_gc_mark_movableAaron Patterson
2019-08-09add rp() and bp() in internal.h.Koichi Sasada
2019-07-12* remove trailing spaces.git
2019-07-12Add note about `STACK_GROW_DIR_DETECTION`.Samuel Williams
2019-05-16don't need to sweep rest.Koichi Sasada
2019-04-20Add `GC.compact` again.tenderlove
2019-04-17Reverting compaction for nowtenderlove
2019-04-17Adding `GC.compact` and compacting GC support.tenderlove
2019-04-10Reverting all commits from r67479 to r67496 because of CI failureskazu
2019-04-09Adding `GC.compact` and compacting GC support.tenderlove
2017-10-29remove rb_threadptr_during_gc().ko1
2017-10-23Drop to support NaCl platform.hsbt
2017-04-12thread.c: during GC for threadnobu
2015-10-06* gc.h, gc.c: introduce new debug function rb_obj_info_dump(VALUE obj)ko1
2015-07-14gc.h: evaluate the macro argument only oncenobu
2015-07-02* gc.c (rb_raw_obj_info): separated from rb_obj_info().ko1
2015-05-31* gc.c , gc.h (rb_obj_info): export obj_info(VALUE) for debugging.ko1
2014-07-06* gc.c: rename is_dying_object() to is_garbage_object().ko1