mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/yaml.rb (YAML::EngineManager): Documentation for #yamler and
#yamler= for using the removed Syck gem as the YAML::ENGINE git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
80455c0d97
commit
110a545d3f
2 changed files with 22 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Feb 4 02:40:00 2013 Zachary Scott <zachary@zacharyscott.net>
|
||||
|
||||
* lib/yaml.rb (YAML::EngineManager): Documentation for #yamler and
|
||||
#yamler= for using the removed Syck gem as the YAML::ENGINE
|
||||
|
||||
Sun Feb 3 16:54:27 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/io/console/io-console.gemspec: bump. [Bug #7762]
|
||||
|
|
20
lib/yaml.rb
20
lib/yaml.rb
|
@ -13,17 +13,31 @@ rescue LoadError
|
|||
end
|
||||
|
||||
module Psych
|
||||
class EngineManager # :nodoc:
|
||||
class EngineManager
|
||||
# Returns the YAML engine in use.
|
||||
#
|
||||
# By default Psych is used but the old and unmaintained Syck may be chosen.
|
||||
#
|
||||
# See #yamler= for more information.
|
||||
attr_reader :yamler
|
||||
|
||||
def initialize
|
||||
def initialize # :nodoc:
|
||||
@yamler = 'psych'
|
||||
end
|
||||
|
||||
def syck?
|
||||
def syck? # :nodoc:
|
||||
false
|
||||
end
|
||||
|
||||
# By default Psych is used but the old and unmaintained Syck may be chosen.
|
||||
#
|
||||
# After installing the 'syck' gem, you can set the YAML engine to syck:
|
||||
#
|
||||
# YAML::ENGINE.yamler = 'syck'
|
||||
#
|
||||
# To set the YAML engine back to psych:
|
||||
#
|
||||
# YAML::ENGINE.yamler = 'psych'
|
||||
def yamler= engine
|
||||
case engine
|
||||
when 'syck' then warn "syck has been removed"
|
||||
|
|
Loading…
Add table
Reference in a new issue