summaryrefslogtreecommitdiff
path: root/ext/psych
diff options
context:
space:
mode:
authorJeremy Ebler <jebler@gmail.com>2021-02-07 18:39:07 -0800
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-05-17 11:20:45 +0900
commit830778db95c1dca5dfad591eae5176d3133bf7ee (patch)
treed0672f3b17acfb5f07affd5bcef24d4b2ffbfcf8 /ext/psych
parent167cff6a5d5241e2929392682cc3a68ece3b0caf (diff)
[ruby/psych] feat: allow scalars and sequences to be styled when dumped
https://github.com/ruby/psych/commit/546154ddb7
Diffstat (limited to 'ext/psych')
-rw-r--r--ext/psych/lib/psych/visitors/yaml_tree.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/psych/lib/psych/visitors/yaml_tree.rb b/ext/psych/lib/psych/visitors/yaml_tree.rb
index ac6777a..bf7c0bb 100644
--- a/ext/psych/lib/psych/visitors/yaml_tree.rb
+++ b/ext/psych/lib/psych/visitors/yaml_tree.rb
@@ -509,9 +509,9 @@ module Psych
def emit_coder c, o
case c.type
when :scalar
- @emitter.scalar c.scalar, nil, c.tag, c.tag.nil?, false, Nodes::Scalar::ANY
+ @emitter.scalar c.scalar, nil, c.tag, c.tag.nil?, false, c.style
when :seq
- @emitter.start_sequence nil, c.tag, c.tag.nil?, Nodes::Sequence::BLOCK
+ @emitter.start_sequence nil, c.tag, c.tag.nil?, c.style
c.seq.each do |thing|
accept thing
end