From: Alex Young Date: 2012-03-20T19:28:40+09:00 Subject: [ruby-core:43493] Re: [ruby-trunk - Feature #4523] Kernel#require to return the path of the loaded file On 19/03/12 23:24, Eric Hodel wrote: > On Mar 19, 2012, at 10:16 AM, Alex Young wrote: >> On 19/03/12 11:58, Luis Lavena wrote: >>> $LOADED_FEATURES include full paths >> >> Does it? Is that now part of the spec? > > Yes. Fine. Close the issue, this feature isn't needed any more. At the time I was trying to get code together which would work on both 1.8 and 1.9 and, for a reason I cannot now fathom, thought this might be generally viewed as a useful thing to have. >> Neither rubinius nor jruby seem to make that guarantee, > > They do. > >> nor is it true for 1.8.7. > > 1.9.1, 1.9.2 and 1.9.3 have been released since 1.8.7, so I don't know why you would check 1.8.7 for new features. Please don't be condescending. If I don't know it's a new feature, how do I know where to look for it? If I don't know it's not an accidental behaviour, how do I know it's guaranteed to be the same across 1.8.7 patch levels - the last of which is *well after* I opened this ticket? >> And if it is... >> >> $ irb >> 1.9.3p125 :001> $LOADED_FEATURES.first >> => "enumerator.so" >> >> Is that a bug? > > I would argue no as enumerator.so is a dummy require: > > rb_provide("enumerator.so"); /* for backward compatibility */ > > to allow old 1.8 programs to continue to require 'enumerator' which is now built-in in ruby 1.9. I'm not arguing that it's not useful. I'm saying that it breaks the guarantee you're saying $LOADED_FEATURES provides. -- Alex