On Mon, May 30, 2011 at 6:00 PM, Xavier Shay <xavier-list / rhnh.net> wrote:
>
>> It is an impossible approach because some extension library can
>> modify $LOADED_FEATURES directly by rb_ary_push.
>> I found amalgalite to do so actually:
>>
>>
>> http://www.google.com/codesearch/p?hl=ja#MyfZfO3_1cw/ext/amalgalite/amalgalite3_requires_bootstrap.c&q=LOADED_FEATURES%20lang:c%20rb_ary_push&l=151
>>
>>> rb_ary_push( rb_gv_get( "$LOADED_FEATURES" ), require_name );
>>
> It seems that amalgalite is the only extension to do this in that search.
> While I realise that doesn't cover everything, it seems the impact is
> perhaps small? Would it be possible to instead work with the maintainer to
> fix, and publicize this change. It seems and odd API to be supporting.
>

There might be others doing rb_ary_push of non-filesystem options into
LOADED_FEATURES.

Specially if Eric Hodel proposal of $LOAD_PATH non-pollution moves
forward, see [ruby-core:31885]:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/31885

There must be an API that defines how $LOAD_PATH and, in this
particular case, $LOADED_FEATURES behave.

-- 
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupy