| 5月 21st, 2007

破壊的メソッドを作ろうとしたら self = xxxx のようには出来ない。replace メソッドを使う。

class Array
  def add!(*vals)
    self.replace(self | vals)
  end
end
download the hurt locker