Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:2417140
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# -*- encoding: utf-8 -*-
#
# -
 
require 'psych'
 
ary = ["Jakub Kuźma", "Timo Rößner"]
p ary.first.encoding
 
builder = Psych::Visitors::YAMLTree.new({})
builder << ary
ast = builder.tree
 
io = StringIO.new
 
Psych::Visitors::Emitter.new(io).accept(ast)
 
str = io.string
p str
p str.encoding
 
str.gsub(/ !!null \n/, " \n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.