summaryrefslogtreecommitdiff
path: root/ext/psych/lib/psych/tree_builder.rb
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-08 19:54:44 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-08 19:54:44 +0000
commit4c63e0274000d41e07cc11fdfa2bfe416ecda8db (patch)
tree7942c9466074e41eeac7e26e82e614e599da9417 /ext/psych/lib/psych/tree_builder.rb
parent7bb2da2e2bf3526bbc7bcbde3a630c1215f76bd6 (diff)
* ext/psych/lib/psych/tree_builder.rb: dump complex numbers,
rationals, etc with reference ids. * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto * ext/psych/lib/psych/visitors/to_ruby.rb: loading complex numbers, rationals, etc with reference ids. * test/psych/test_object_references.rb: corresponding tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych/lib/psych/tree_builder.rb')
-rw-r--r--ext/psych/lib/psych/tree_builder.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/psych/lib/psych/tree_builder.rb b/ext/psych/lib/psych/tree_builder.rb
index 8b4e972314..c8f344787c 100644
--- a/ext/psych/lib/psych/tree_builder.rb
+++ b/ext/psych/lib/psych/tree_builder.rb
@@ -72,7 +72,9 @@ module Psych
end
def scalar value, anchor, tag, plain, quoted, style
- @last.children << Nodes::Scalar.new(value,anchor,tag,plain,quoted,style)
+ s = Nodes::Scalar.new(value,anchor,tag,plain,quoted,style)
+ @last.children << s
+ s
end
def alias anchor