From: Fredrik Date: 2008-04-29T16:55:02+09:00 Subject: Array#first is not Array#[0] I made a class that is a subclass of Array : class MyClass < Array def [](i) "Here you go: #{super(i)}" end end and I thought that Array#first and Array#last was just syntactic sugar that would translate to Array#[0] and Array#[-1] respectively. But it's not: irb> g = MyClass.new([1,2,3]) => [1, 2, 3] irb> g[0] => "Here you go: 1" irb> g.first => 1 Now, isn't that really, really crazy? Am I supposed to define MyClass#first and MyClass#last separately??? Best regards, Fredrik