On Tue, 13 Dec 2005, Jeremy Kemper wrote:

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.

sounds easy(ish) - i think you could setup a dependancy graph using a hash
full of method objects, tsort it, and blow up on Circularity error (or
whatever the heck it throws).

want to spec the desired interface?

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.

i think the one is posted is robust enough... the only caveat is that i'm
unsure if File::expand_path resolves links on windows.  this shouldn't be a
show stopperper though - i'm assuming that people don't have rails_roots full
of links...

regards.

-a
--
===============================================================================
| ara [dot] t [dot] howard [at] noaa [dot] gov
| all happiness comes from the desire for others to be happy.  all misery
| comes from the desire for oneself to be happy.
| -- bodhicaryavatara
===============================================================================

_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to