Issue #4859 has been updated by Nobuyoshi Nakada.

Status changed from Open to Rejected

Now Array#flatten tries to expand elements by to_ary, that is it's a spec change.
----------------------------------------
Bug #4859: Debug output in 1.8 vs 1.9
http://redmine.ruby-lang.org/issues/4859

Author: Aaron Patterson
Status: Rejected
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.7.0]


This code emits warnings in debug mode in 1.9 but does not in 1.8:

    $-d = true
    
    class Foo
      def method_missing(method, *args, &block)
        super
      end
    end
    
    [[Foo.new]].flatten

In 1.8, there is no output, but in 1.9 it says:

    Exception `NoMethodError' at warn.rb:5 - undefined method `to_ary' for #<Foo:0x0000010086d908>



-- 
http://redmine.ruby-lang.org