summaryrefslogtreecommitdiff
path: root/lib/yaml/rubytypes.rb
diff options
context:
space:
mode:
authorwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-11 22:52:14 +0000
committerwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-11 22:52:14 +0000
commita1e257ec48911d3ca1aaeda0127061c244f36147 (patch)
treeb77a31d1f26f6f313ee33af850fc539a6e149f39 /lib/yaml/rubytypes.rb
parent30399f6c758c85ac9794d4298ee2b51426a144bc (diff)
* ext/syck/emitter.c: new emitter code.
* ext/syck/rubyext.c: Emitter class. * lib/yaml.rb: Load Syck emitter, if available. * lib/yaml/stream.rb: ditto. * lib/yaml/baseemitter.rb: underlying class for all emitters. * lib/yaml/rubytypes.rb: use BaseEmitter abstraction. * lib/yaml/emitter.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/yaml/rubytypes.rb')
-rw-r--r--lib/yaml/rubytypes.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/yaml/rubytypes.rb b/lib/yaml/rubytypes.rb
index 09aab98895..9f661b0b6c 100644
--- a/lib/yaml/rubytypes.rb
+++ b/lib/yaml/rubytypes.rb
@@ -53,14 +53,14 @@ class Hash
opts[:DocType] = self.class if Hash === opts
YAML::quick_emit( self.object_id, opts ) { |out|
hash_type = to_yaml_type
- if not out.options[:ExplicitTypes] and hash_type == "!map"
+ if not out.options(:ExplicitTypes) and hash_type == "!map"
hash_type = ""
end
out.map( hash_type ) { |map|
#
# Sort the hash
#
- if out.options[:SortKeys]
+ if out.options(:SortKeys)
map.concat( self.sort )
else
map.concat( self.to_a )
@@ -213,7 +213,7 @@ class Array
opts[:DocType] = self.class if Hash === opts
YAML::quick_emit( self.object_id, opts ) { |out|
array_type = to_yaml_type
- if not out.options[:ExplicitTypes] and array_type == "!seq"
+ if not out.options(:ExplicitTypes) and array_type == "!seq"
array_type = ""
end
@@ -302,7 +302,7 @@ class String
end
end
if not complex
- ostr = if out.options[:KeepValue]
+ ostr = if out.options(:KeepValue)
self
elsif empty?
"''"