class BadProxyObject
  def initialize
    @p =3D Object.new
    def @p.to_ary
      raise "I should never be called"
    end
  end

  def respond_to?(*a)
    p :bad_respond_to? =3D> a
    false
  end

  def method_missing(msg, *)
    p :bad_method_missing =3D> msg
    @p.send msg
  end
end

[[BadProxyObject.new]].flatten

# {:bad_method_missing=3D>:to_ary}
# Exception `RuntimeError' at wtf.rb:6 - I should never be called
# wtf.rb:6:in `to_ary': I should never be called (RuntimeError)
#   from wtf.rb:17:in `method_missing'
#   from wtf.rb:21:in `flatten'
#   from wtf.rb:21:in `<main>'

Extra Info: =
http://tenderlovemaking.com/2011/06/28/til-its-ok-to-return-nil-from-to_ar=
y/