Hi,

On Sun, Jun 26, 2011 at 12:42 PM, Jay Feldblum <y_feldblum / yahoo.com> wrote=
:
>
> This minor performance issue becomes a huge problem when NilClass#method_=
missing is defined, such as in ActiveSupport

Thanks for showing the performance impacts of defining
NilClass#method_missing as ActiveSupport does.

Instead of subverting the language (since `nil` is not an Array, as
Yui Naruse and I pointed out and thus should not respond to `to_ary`),
you could ask ActiveSupport to reimplement the whiny nil feature by
rescuing NoMethodErrors at the top level, parsing them and rewriting
them if the object called was `nil` and the method is recognized (or
to define NilClass#to_ary, even though I feel it's not a great idea)

It is possible that they will suggest you simply turn off the whiny
nil feature (config.whiny_nils =3D false) in the environment in which
you have performance issues.

--
Marc-Andr=E9