108件ヒット
[101-108件を表示]
(0.024秒)
別のキーワード
ライブラリ
- ビルトイン (72)
- forwardable (24)
-
rdoc
/ context (12)
クラス
- Object (72)
-
RDoc
:: Context (12)
モジュール
- SingleForwardable (24)
キーワード
-
def
_ delegators (12) -
def
_ single _ delegators (12) -
initialize
_ copy (12) -
private
_ methods (12) -
protected
_ methods (12) -
public
_ methods (12) -
set
_ visibility _ for (12) -
singleton
_ methods (12)
検索結果
-
Object
# initialize _ copy(obj) -> object (49.0) -
(拡張ライブラリによる) ユーザ定義クラスのオブジェクトコピーの初期化メソッド。
...tainted?}"
print "singleton methods: "
begin
p obj.bar
rescue NameError
p $!
end
end
obj.foo = 1
obj.taint
check Object.new.send(:initialize_copy, obj)
#=> instance variables: #<Object:0x4019c9d4>
# tainted?: false
# singleton methods: #<NoMethodError: .......Object:0x4019c9c0 @foo=1>
# tainted?: true
# singleton methods: #<NoMethodError: ...>
check obj.clone
#=> instance variables: #<Object:0x4019c880 @foo=1>
# tainted?: true
# singleton methods: :bar
//}
@see Object#initialize_clone, Object#initialize_du......ce variables: #{obj.inspect}"
print "singleton methods: "
begin
p obj.bar
rescue NameError
p $!
end
end
obj.foo = 1
check Object.new.send(:initialize_copy, obj)
#=> instance variables: #<Object:0x4019c9d4>
# singleton methods: #<NoMethodError: ...>
check obj.dup......#=> instance variables: #<Object:0x4019c9c0 @foo=1>
# singleton methods: #<NoMethodError: ...>
check obj.clone
#=> instance variables: #<Object:0x4019c880 @foo=1>
# singleton methods: :bar
//}
@see Object#initialize_clone, Object#initialize_dup...