# File lib/backports/tools/std_lib.rb, line 8 def include?(feature) return true if @@our_loads[feature] # Assume backported features are Ruby libraries (i.e. not C) @loaded ||= $LOADED_FEATURES.group_by{|p| File.basename(p, ".rb")} if fullpaths = @loaded[File.basename(feature, ".rb")] fullpaths.any?{|fullpath| base_dir, = fullpath.partition("/#{feature}") $LOAD_PATH.include?(base_dir) } end end