るりまサーチ

最速Rubyリファレンスマニュアル検索!
271件ヒット [1-100件を表示] (0.160秒)
トップページ > クエリ:-[x] > クエリ:r[x] > クエリ:clone[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

検索結果

<< 1 2 3 > >>

Rake::Cloneable#clone -> object (24231.0)

自身を複製します。

...されています。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
file_list = FileList['a.c', 'b.c']
clone
= file_list.clone
clone
# => ["a.c", "b.c"]
clone
.exclude("a.c")
clone
== file_list # => false
end
/...

Array#clone -> Array (21313.0)

レシーバと同じ内容を持つ新しい配列を返します。

...レシーバと同じ内容を持つ新しい配列を返します。

clone
は frozen singleton-class の情報も含めてコピーしますが、
dup は内容と tainted だけをコピーします。
またどちらのメソッドも要素それ自体のコピーはしません。
つまり...
...ているオブジェクトが変わらない「浅い(shallow)」コピーを行います。

//emlist[例][ruby]{
ary = ['string']
p ary #=> ["string"]
copy = ary.dup
p copy #=> ["string"]

ary[0][0...3] = ''
p ary #=> ["ing"]
p copy #=> ["ing"]
//}...
...レシーバと同じ内容を持つ新しい配列を返します。

clone
は frozen singleton-class の情報も含めてコピーしますが、
dup は内容だけをコピーします。
またどちらのメソッドも要素それ自体のコピーはしません。
つまり参照して...
...いるオブジェクトが変わらない「浅い(shallow)」コピーを行います。

//emlist[例][ruby]{
ary = ['string']
p ary #=> ["string"]
copy = ary.dup
p copy #=> ["string"]

ary[0][0...3] = ''
p ary #=> ["ing"]
p copy #=> ["ing"]
//}...

Matrix#clone -> Matrix (21301.0)

自分自身のコピーを返します。

自分自身のコピーを返します。

REXML::Attribute#clone -> REXML::Element (21301.0)

self を複製し返します。

self を複製し返します。

REXML::CData#clone -> REXML::CData (21301.0)

self を複製して返します。

self を複製して返します。

親ノードの情報は複製されません。

絞り込み条件を変える

REXML::Comment#clone -> REXML::Comment (21301.0)

内容が複製された Comment オブジェクトを返します。 (親ノードの情報は複製されません)。

内容が複製された Comment オブジェクトを返します。
(親ノードの情報は複製されません)。

REXML::DocType#clone -> REXML::DocType (21301.0)

self の複製を返します。

...self の複製を返します。

external_id (REXML::DocType#external_id) と
名前(REXML::DocType#name) のみ複製されるため、
結果として得られるオブジェクトはあまり有用ではないでしょう。...

REXML::Document#clone -> REXML::Document (21301.0)

self を複製します。

...self を複製します。

R
EXML::Document.new(self) と同じです。...

REXML::Element#clone -> REXML::Element (21301.0)

self を複製して返します。

self を複製して返します。

複製されるのは名前、属性、名前空間のみです。
子ノードは複製されません。

REXML::Instruction#clone -> REXML::Instruction (21301.0)

self を複製します。

self を複製します。

絞り込み条件を変える

<< 1 2 3 > >>