method
load_yaml
v1_9_3_125 -
Show latest stable
- Class:
Gem
load_yaml()public
# File lib/rubygems.rb, line 645
def self.load_yaml
begin
gem 'psych', '~> 1.2', '>= 1.2.1' unless ENV['TEST_SYCK']
rescue Gem::LoadError
# It's OK if the user does not have the psych gem installed. We will
# attempt to require the stdlib version
end
begin
# Try requiring the gem version *or* stdlib version of psych.
require 'psych' unless ENV['TEST_SYCK']
rescue ::LoadError
ensure
require 'yaml'
end
# Hack to handle syck's DefaultKey bug with psych.
# See the note at the top of lib/rubygems/requirement.rb for
# why we end up defining DefaultKey more than once.
if !defined? YAML::Syck
YAML.module_eval do
const_set 'Syck', Module.new {
const_set 'DefaultKey', Class.new
}
end
end
end Related methods
- Class methods
- activate
- activate_dep
- activate_spec
- all_load_paths
- available?
- bin_path
- binary_mode
- bindir
- cache
- cache_dir
- cache_gem
- clear_paths
- config_file
- configuration
- configuration=
- datadir
- default_bindir
- default_dir
- default_exec_format
- default_path
- default_sources
- default_system_source_cache_dir
- default_user_source_cache_dir
- deflate
- dir
- ensure_gem_subdirectories
- ensure_ssl_available
- find_files
- gunzip
- gzip
- host
- host=
- inflate
- latest_load_paths
- latest_rubygems_version
- latest_spec_for
- latest_version_for
- load_env_plugins
- load_path_insert_index
- load_plugin_files
- load_plugins
- load_yaml
- loaded_path?
- location_of_caller
- marshal_version
- path
- paths
- paths=
- platforms
- platforms=
- post_build
- post_install
- post_reset
- post_uninstall
- pre_install
- pre_reset
- pre_uninstall
- prefix
- promote_load_path
- read_binary
- refresh
- required_location
- ruby
- ruby=
- ruby_engine
- ruby_version
- searcher
- searcher=
- source_index
- source_index=
- sources
- sources=
- ssl_available?
- suffix_pattern
- suffixes
- time
- try_activate
- ui
- unresolved_deps
- use_paths
- user_dir
- user_home
- win_platform=
- win_platform?
- Private methods
-
all_partials -
each_load_path -
find_home -
latest_partials -
report_activate_error