> > [1, 2, 3].flat_map { |n| n }.to_a > ... I was writing rubyspec for Enumerable::Lazy#flat_map had the same behaviour as Enumerable#flat_map (besides the obvious differences in return value). Here is what I was using as a basis: htt...dkubb (Dan Kubb)
When the #each method yields more than one argument, Enumerable::Lazy#select only accepts the first argument, e.g.: class MultiYield include Enumerable ...dkubb (Dan Kubb)
The following statement will raise "NoMethodError: undefined method `each' for 1:Fixnum": [1, 2, 3].lazy.flat_map { |n| n }.to_a It appears as if Enumerable::Lazy#flat_map is calling #each on every element, regardless of whether ...dkubb (Dan Kubb)
Under ruby-head, when calling #respond_to? on another object of the same type false is always returned, even though the method can be called. However, this returns true under ruby 1.9.3. Attached is a test that reproduces the problem.dkubb (Dan Kubb)