Project

General

Profile

Actions

Bug #4859

closed

Debug output in 1.8 vs 1.9

Added by tenderlovemaking (Aaron Patterson) almost 13 years ago. Updated almost 13 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.7.0]
Backport:
[ruby-core:36893]

Description

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>

Updated by nobu (Nobuyoshi Nakada) almost 13 years ago

  • Status changed from Open to Rejected

Now Array#flatten tries to expand elements by to_ary, that is it's a spec change.

Actions

Also available in: Atom PDF

Like0
Like0