-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Dec 13, 2005, at 9:39 AM, Ara.T.Howard wrote:
this kind of thing exists in other places in the code as well.
here are
summaries of the two stack traces when this code is loaded:
[...]
yikes. basically what is happening is that Callbacks gets mixed into
ActiveRecord::Base __twice__ - setting up a recursive defintion of
#instantiate (the second time).
Thanks for the detective work, Ara. It's interesting that defined?
(Foo::Bar) results in a const_missing call for Foo but defined?(Foo)
does not.
now, why this seems to be platform dependant i do not understand
yet - but the
combination of autoloading hooks, require overrides, and non-
protected (unless
defined?...) class defs and method aliases seem fragile.
Yes! I am so eager for Ruby 2 to obviate their need.
i'm trying to fix - but it seems a wholesale revamp of the loading
methods and
definition strategy is in order. on the otherhand an __early__
subversion of
require to occur exactly once no matter what might short circuirt
the whole
thing...
I'd like a Module#wrap_method in Active Support to DRY up the
repetitive, error-prone aliasing and give us a single place to more
thoroughly check for double-wrapping.
A robust require_once would be a good adjunct. Perhaps we could
directly backport what's been done in 1.9 to ensure future
compatibility.
Best,
jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)
iD8DBQFDnxB5AQHALep9HFYRAn/1AJ0cz+GgbBjHkdSzi8K1LElEYrLK0gCglGi7
KLmjt5WowO7TrjZYUp9xrEA=
=bBh6
-----END PGP SIGNATURE-----
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core