From: Yukihiro Matsumoto Date: 2007-06-16T22:09:28+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 21:05:01 +0900, Daniel Berger writes: |> 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. |Can we say then, as a general rule, that defining a custom to_ary method |on an array object results in undefined behavior for certain methods? I don't call it "undefined", but it might be differ from _your_ expectation. to_ary is designed to be a part of mimicking array-like duck. Defining to_ary only may cause inconsistent behavior. matz.