Project

General

Profile

Feature #9445 ยป pp.patch

Patches the pp_hash method to emit "foo: " syntax for Symbol Hash keys - postmodern (Hal Brodigan), 01/24/2014 02:11 AM

View differences:

lib/pp.rb (working copy)
group(1, '{', '}') {
seplist(obj, nil, :each_pair) {|k, v|
group {
pp k
text '=>'
if Symbol === k && k =~ /\A\w+\z/
text "#{k}: "
else
pp k
text '=>'
end
group(1) {
breakable ''
pp v
    (1-1/1)