[Rubygems-developers] autoload
NAKAMURA, Hiroshi
nakahiro at sarion.co.jp
Sun Oct 28 22:55:56 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Trans wrote:
> I just discovered an interesting problem with overriding
> Kernel#require. Because RUbyGems does this it is likewise effected.
>
> Make sure you 'redcloth' installed via the gem and then try this:
>
> require 'rubygems'
> require 'redcloth'
> p RedCloth
>
> Works fine. Now this:
>
> require 'rubygems'
gem 'redcloth'
> autoload(:RedCloth, 'redcloth')
> p RedCloth
> It fails to find redcloth; apparently b/c the autoload trigger is
> using it's own require code and not any of the overridable methods
> (I've tried Kernel.require, Kernel#require and the load methods for
> that matter).
Sure. Why don't you ask this on ruby-core?
Regards,
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
iQEVAwUBRyVLux9L2jg5EEGlAQImmQf/Y5M4pOz74+0jwNqt6o6B8LabtoeUirlr
qsHCCfMnstvy0XHS6NHZi8kA0ZlgtglQerFkD1TN7m2u6h87vLTew8HEaYJxTTSL
pMg6+SkG+hlrpDSDGKe1fen9yfNQDRTtr9QliLXpBE24Bwwl/wnxI33hqerA5oHm
je0UiCN4zqm33nDaDqMneZfwd+WdIawGLf4dgnuRJZiBVb3+1HsEd41HZxOW7RPi
6ZBnXSsdsRWxEXzs5grHsjYRSTsU45N6qUUHgNQqL705edKrul4AtUh+XrnB75U7
YKGcnr2rI+Yscea064WIthNhzTZT4RSEmUCH8iLCtgAcULjERp2cvw==
=KLBx
-----END PGP SIGNATURE-----
More information about the Rubygems-developers
mailing list