summaryrefslogtreecommitdiff
path: root/lib/yaml.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yaml.rb')
-rw-r--r--lib/yaml.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/yaml.rb b/lib/yaml.rb
index fe8335c..a8da42a 100644
--- a/lib/yaml.rb
+++ b/lib/yaml.rb
@@ -384,6 +384,10 @@ module YAML
else
emitter.reset( opts )
end
+ oid =
+ case oid when Fixnum, NilClass; oid
+ else oid = "#{oid.object_id}-#{oid.hash}"
+ end
out.emit( oid, &e )
end