# File lib/fastri/util.rb, line 12 def self.default_dir if defined? RUBY_FRAMEWORK_VERSION paths = [] paths << APPLE_GEM_HOME if defined? APPLE_GEM_HOME path = File.join(File.dirname(Config::CONFIG["sitedir"]), "Gems") newpath = File.join(path, Config::CONFIG['ruby_version']) # RubyGems post r1498 appends the ruby version to the path. This # modification was included in the RubyGems shipped with 10.5.0. if File.directory?(newpath) # try new path first, user might have upgraded RubyGems and left old # installation behind paths + [ newpath ] else # pre-10.5.0 or older RubyGems paths + [ path ] end else [ File.join(Config::CONFIG['libdir'], 'ruby', 'gems', Config::CONFIG['ruby_version']) ] end end