lib/yaml-write-stream/yielding.rb in yaml-write-stream-2.0.0 vs lib/yaml-write-stream/yielding.rb in yaml-write-stream-2.0.1
- old
+ new
@@ -101,10 +101,11 @@
super()
end
def write_key_value(key, value)
@first = false
- write_scalar(key)
+ quote_key = !!(key =~ /\A\d+\z/)
+ write_scalar(key, quote_key)
write_scalar(value, true)
end
end
class YieldingSequenceWriter < YieldingWriter