From a1e257ec48911d3ca1aaeda0127061c244f36147 Mon Sep 17 00:00:00 2001 From: why Date: Fri, 11 Jul 2003 22:52:14 +0000 Subject: * 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 --- lib/yaml/rubytypes.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/yaml/rubytypes.rb') 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? "''" -- cgit v1.2.3