るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.180秒)
トップページ > クエリ:-[x] > クエリ:E[x] > クエリ:d[x] > モジュール:Rake::Cloneable[x]

別のキーワード

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

ライブラリ

検索結果

Rake::Cloneable#dup -> object (9301.0)

自身と同じクラスのオブジェクトを作成後、自身のインスタンス変数を 全て新たに作成したオブジェクトにコピーします。

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

task default: :test_rake_app
task :test_rake_app do
file_list = FileList['a.c', 'b.c']
file_list.freeze
d
up = file_list.dup
clone = file_list.clone
d
up.exclude("a.c") # => ["b.c"]
clone.exclude("a.c") # => can't modify frozen Rake:...
...:FileList
e
nd
//}...