84件ヒット
[1-84件を表示]
(0.151秒)
ライブラリ
- ビルトイン (84)
クラス
-
Encoding
:: Converter (48) - Hash (12)
- Object (24)
キーワード
- clone (12)
-
primitive
_ convert (48) - replace (12)
検索結果
先頭5件
- Object
# dup -> object - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer) -> Symbol - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol
-
Object
# dup -> object (18352.0) -
オブジェクトの複製を作成して返します。
...ェクトの複製を作成して返します。
dup はオブジェクトの内容, taint 情報をコピーし、
clone はそれに加えて freeze, 特異メソッドなどの情報も含めた完全な複製を作成します。
clone や dup は浅い(shallow)コピーであることに注......そして Numeric クラスのインスタンスなど一部のオブジェクトは複製ではなくインスタンス自身を返します。
@param freeze true を指定すると freeze されたコピーを返します。
false を指定すると freeze されていないコピ......bj.freeze
p(obj.equal?(obj)) #=> true
p(obj == obj) #=> true
p(obj.tainted?) #=> true
p(obj.frozen?) #=> true
p(obj.respond_to?(:fuga)) #=> true
obj_c = obj.clone
p(obj.equal?(obj_c)) #=> false
p(obj == obj_c) #=> true
p(obj_c.t......j.freeze
p(obj.equal?(obj)) #=> true
p(obj == obj) #=> true
p(obj.tainted?) #=> false
p(obj.frozen?) #=> true
p(obj.respond_to?(:fuga)) #=> true
obj_c = obj.clone
p(obj.equal?(obj_c)) #=> false
p(obj == obj_c) #=> true
p(obj_c.t......オブジェクトの複製を作成して返します。
dup はオブジェクトの内容をコピーし、
clone はそれに加えて freeze, 特異メソッドなどの情報も含めた完全な複製を作成します。
clone や dup は浅い(shallow)コピーであることに注意し......eze
p(obj.equal?(obj)) #=> true
p(obj == obj) #=> true
p(obj.frozen?) #=> true
p(obj.respond_to?(:fuga)) #=> true
obj_c = obj.clone
p(obj.equal?(obj_c)) #=> false
p(obj == obj_c) #=> true
p(obj_c.frozen?) #=> true
p(obj_c.respond... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer) -> Symbol (6143.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...ncoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesi......容量
@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversi......put before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_emp... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol (6143.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...ncoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesi......容量
@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversi......put before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_emp... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol (6143.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...ncoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesi......容量
@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversi......put before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_emp... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol (6143.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...ncoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesi......容量
@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversi......put before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_emp... -
Hash
# replace(other) -> self (6143.0) -
ハッシュの内容を other の内容で置き換えます。
...= other.to_hash.dup と同じです。
@param other ハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return self を返します。
//emlist[例][ruby]{
foo = {1 => 'a', 2 => 'b'}
bar = {2 => 'B', 3 => 'C'}
foo.replace(bar)
p foo #=> {2=>"B......", 3=>"C"}
zoo = {}
zoo = bar.dup
p zoo #=> {2=>"B", 3=>"C"}
class Foo
def to_hash
{:japan => 'kyoto'}
end
end
h = Hash.new
h.replace(Foo.new) #暗黙の変換
p h #=> {:japan=>"kyoto"}
//}
@see Hash#dup,Hash#merge,Object#to_hash... -
Object
# clone(freeze: nil) -> object (152.0) -
オブジェクトの複製を作成して返します。
...ェクトの複製を作成して返します。
dup はオブジェクトの内容, taint 情報をコピーし、
clone はそれに加えて freeze, 特異メソッドなどの情報も含めた完全な複製を作成します。
clone や dup は浅い(shallow)コピーであることに注......そして Numeric クラスのインスタンスなど一部のオブジェクトは複製ではなくインスタンス自身を返します。
@param freeze true を指定すると freeze されたコピーを返します。
false を指定すると freeze されていないコピ......bj.freeze
p(obj.equal?(obj)) #=> true
p(obj == obj) #=> true
p(obj.tainted?) #=> true
p(obj.frozen?) #=> true
p(obj.respond_to?(:fuga)) #=> true
obj_c = obj.clone
p(obj.equal?(obj_c)) #=> false
p(obj == obj_c) #=> true
p(obj_c.t......j.freeze
p(obj.equal?(obj)) #=> true
p(obj == obj) #=> true
p(obj.tainted?) #=> false
p(obj.frozen?) #=> true
p(obj.respond_to?(:fuga)) #=> true
obj_c = obj.clone
p(obj.equal?(obj_c)) #=> false
p(obj == obj_c) #=> true
p(obj_c.t......オブジェクトの複製を作成して返します。
dup はオブジェクトの内容をコピーし、
clone はそれに加えて freeze, 特異メソッドなどの情報も含めた完全な複製を作成します。
clone や dup は浅い(shallow)コピーであることに注意し......eze
p(obj.equal?(obj)) #=> true
p(obj == obj) #=> true
p(obj.frozen?) #=> true
p(obj.respond_to?(:fuga)) #=> true
obj_c = obj.clone
p(obj.equal?(obj_c)) #=> false
p(obj == obj_c) #=> true
p(obj_c.frozen?) #=> true
p(obj_c.respond...