Commit 27e3d92a authored by KOBAYASHI Shuji's avatar KOBAYASHI Shuji

Remove `Enumerator::Chain#initialize_copy`

I think `Enumerator::Chain#initialize_copy` is unnecessary because CRuby
doesn't clone elements.
parent 04a422e4
......@@ -20,10 +20,6 @@ class Enumerator
@enums = args
end
def initialize_copy(orig)
@enums = orig.__copy_enums
end
def each(&block)
return to_enum unless block_given?
......@@ -53,11 +49,5 @@ class Enumerator
def inspect
"#<#{self.class}: #{@enums.inspect}>"
end
def __copy_enums
@enums.each_with_object([]) do |e, a|
a << e.clone
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment