From: Nikolai Weibull Date: 2012-05-03T13:09:43+09:00 Subject: [ruby-core:44835] Re: [ruby-trunk - Feature #6376][Feedback] Feature lookup and checking if feature is loaded On Thu, May 3, 2012 at 6:02 AM, mame (Yusuke Endoh) wrote: > > Issue #6376 has been updated by mame (Yusuke Endoh). > > Status changed from Open to Feedback > > Of course you know what is defined by the feature you loaded, don't you? > (If not, you must not load such a file; it is very dangerous) > > So you can use: defined?(OpenStruct) Except that defined? won���t work for paths: class A end class B end p defined?(A::B) so if you have a file that provides A::B and B has already been provided by another library, then defined? won���t work.