diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2021-05-10 09:59:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-10 09:59:44 -0700 |
commit | 64bee7e2dee741a9f64e5c1b2122c07ef3e6c81a (patch) | |
tree | 3c958e22d700b52c01b94d80d39d68bb841e72a7 /lib | |
parent | 8fcdc380c0493911e95bea6989c2a629ba68e101 (diff) | |
parent | 546154ddb71b125794c5eed36817ad27ac373dd5 (diff) | |
download | psych-64bee7e2dee741a9f64e5c1b2122c07ef3e6c81a.tar.gz |
Merge pull request #475 from whitehat101/feature/dynamic-scalar-seq-style
feat: allow scalars and sequences to be styled when dumped
Diffstat (limited to 'lib')
-rw-r--r-- | lib/psych/visitors/yaml_tree.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/psych/visitors/yaml_tree.rb b/lib/psych/visitors/yaml_tree.rb index ac6777a..bf7c0bb 100644 --- a/lib/psych/visitors/yaml_tree.rb +++ b/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 |