From: Victor Shepelev Date: 2009-07-05T07:00:25+09:00 Subject: [ruby-core:24139] [Bug #1723] respond_to? vs. to_ary Bug #1723: respond_to? vs. to_ary http://redmine.ruby-lang.org/issues/show/1723 Author: Victor Shepelev Status: Open, Priority: Normal ruby -v: ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32_71] # class with respond_to? redefined class A def respond_to?(m); false end end x = [A.new] # deconstructing iteration x.each do |a, b| p [a,b] end It outputs [nil, nil], while [#, nil] is expected. If I comment out respond_to? in A, all works as expected ---------------------------------------- http://redmine.ruby-lang.org