From: Soichi Ishida Date: 2012-07-05T18:41:55+09:00 Subject: self.clone.replace(super)? Hi. Could anyone help me understand the following? I am reading a piece of code that someone else wrote. class RegexAlternation < Array def sort self.clone.replace(super) end def uniq self.clone.replace(super) end def map self.clone.replace(super {|x| yield(x)}) end def delete_if self.clone.replace(super {|x| yield(x)}) end def select self.clone.replace(super {|x| yield(x)}) end end It looks like overriding the existing methods. But the definitions are very simple, so I am kinda lost here. I appreciate if you provide some test codes to see what they do. soichi -- Posted via http://www.ruby-forum.com/.