End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
PP::PPMethods#pp_hash
pp_hash(obj)
lib/pp.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/pp.rb, line 281
def pp_hash(obj)
group(1, '{', '}') {
seplist(obj, nil, :each_pair) {|k, v|
group {
pp k
text '=>'
group(1) {
breakable ''
pp v
}
}
}
}
end
A pretty print for a Hash
See also
#pp
#pp_object
#pop_inspect_key
#push_inspect_key
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0