summaryrefslogtreecommitdiff
path: root/lib/yaml/rubytypes.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
commit287a34ae0dfc23e4158f67cb7783d239f202c368 (patch)
tree5e35d5b41aae961b37cf6632f60c42f51c7aa775 /lib/yaml/rubytypes.rb
parent9b52ae2e6491bb5d6c59e1799449f6268baf6f89 (diff)
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/yaml/rubytypes.rb')
-rw-r--r--lib/yaml/rubytypes.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/yaml/rubytypes.rb b/lib/yaml/rubytypes.rb
index ae65b355e1..b2745b4542 100644
--- a/lib/yaml/rubytypes.rb
+++ b/lib/yaml/rubytypes.rb
@@ -64,7 +64,7 @@ class Struct
end
if not struct_type
struct_def = [ tag.split( ':', 4 ).last ]
- struct_type = Struct.new( *struct_def.concat( val.keys.collect { |k| k.intern } ) )
+ struct_type = Struct.new( *struct_def.concat( val.keys.collect { |k| k.intern } ) )
end
#
@@ -317,7 +317,7 @@ class Time
utc_same_instant = self.dup.utc
utc_same_writing = Time.utc(year,month,day,hour,min,sec,usec)
difference_to_utc = utc_same_writing - utc_same_instant
- if (difference_to_utc < 0)
+ if (difference_to_utc < 0)
difference_sign = '-'
absolute_difference = -difference_to_utc
else
@@ -388,9 +388,9 @@ class Rational
Rational( val['numerator'], val['denominator'] )
end
end
- def to_yaml( opts = {} )
+ def to_yaml( opts = {} )
YAML::quick_emit( self, opts ) do |out|
- out.map( taguri, nil ) do |map|
+ out.map( taguri, nil ) do |map|
map.add( 'denominator', denominator )
map.add( 'numerator', numerator )
end
@@ -435,7 +435,7 @@ class FalseClass
end
end
-class NilClass
+class NilClass
yaml_as "tag:yaml.org,2002:null"
def to_yaml( opts = {} )
YAML::quick_emit( nil, opts ) do |out|