From: Yukihiro Matsumoto Date: 2012-03-17T10:15:52+09:00 Subject: [ruby-core:43365] Re: [ruby-trunk - Bug #6155] Enumerable::Lazy#flat_map raises an exception when an element does not respond to #each Hi, In message "Re: [ruby-core:43357] [ruby-trunk - Bug #6155] Enumerable::Lazy#flat_map raises an exception when an element does not respond to #each" on Sat, 17 Mar 2012 06:42:22 +0900, Marc-Andre Lafortune writes: |> [1, 2, 3].concat(4) raises a TypeError, so [1, 2, 3].flat_map { |n| n } should raise an error, I think. | |I understand your point of view. This behavior was clearly intended in Matz's original commit, though (r25456). Changing this could also introduce some compatibility issues. | |I feel it might be best to keep the current behavior, but Matz will have the final word on this. I vote on keeping the current behavior. matz.