$LOADED_FEATURESっていうのがある。

% pry
[1] pry(main)> $LOADED_FEATURES
=> ["enumerator.so",
 "/usr/local/opt/rbenv/versions/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/enc/encdb.bundle",
 "/usr/local/opt/rbenv/versions/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/enc/trans/transdb.bundle",
 "/usr/local/opt/rbenv/versions/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/rbconfig.rb",
 "/usr/local/opt/rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/compatibility.rb",
 "/usr/local/opt/rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/defaults.rb",
 "/usr/local/opt/rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/deprecate.rb",
 "/usr/local/opt/rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/errors.rb",
 "/usr/local/opt/rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/version.rb",
(snip)

ほうほう。

rubygems - How do I get a list of files that have been `required` in Ruby? - Stack Overflow

Comments


Option