るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.118秒)

別のキーワード

  1. kernel $-l
  2. lupdecomposition l
  3. _builtin $-l
  4. matrix l
  5. l matrix

ライブラリ

モジュール

検索結果

Rake::Cloneable#clone -> object (30238.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
//}...

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

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

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

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