查看网站首页
查看网站首页
查看 sitemap.xml
✏️ 正在编辑: cloneable.rb
路径:
/opt/alt/ruby30/share/gems/gems/rake-13.0.3/lib/rake/cloneable.rb
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
# frozen_string_literal: true module Rake ## # Mixin for creating easily cloned objects. module Cloneable # :nodoc: # The hook that is invoked by 'clone' and 'dup' methods. def initialize_copy(source) super source.instance_variables.each do |var| src_value = source.instance_variable_get(var) value = src_value.clone rescue src_value instance_variable_set(var, value) end end end end
💾 保存文件
← 返回文件管理器