From: Yukihiro Matsumoto Date: 2007-06-16T17:24:31+09:00 Subject: Re: Strange Array#transpose behavior for custom to_ary method Hi, In message "Re: Strange Array#transpose behavior for custom to_ary method" on Sat, 16 Jun 2007 12:01:45 +0900, Daniel Berger writes: |This a bug? No, to_ary is to convert non-array object into array when it's used as an operand. In this case, Foo is not non-array nor operand. matz. |irb(main):001:0> class Foo < Array |irb(main):002:1> def to_ary |irb(main):003:2> [[1,2],[3,4],[5,6]] |irb(main):004:2> end |irb(main):005:1> end |=> nil |irb(main):006:0> Foo.new.transpose |=> []