From: "Iñaki Baz Castillo" Date: 2011-05-24T21:07:32+09:00 Subject: Re: Using sprintf() to print a Hash 2011/5/24 Xavier Noria : > Not sure if I understand correctly, but this seems to do what you are > looking for > > hash.each do |key, value| >  printf "%-12s %10s\n", "#{key}:", value > end > > Max field widths may be computed for arbitrary hashes. Yes, I got exactly that as todl in my previous mail :) > -- fxn > > PD: Note that I use printf, format is the same as sprintf, but you print the > formatted string directly, as in C. Thanks for pointing it out. -- Iñaki Baz Castillo