From: "Iñaki Baz Castillo" Date: 2011-05-25T00:25:19+09:00 Subject: Re: Using sprintf() to print a Hash 2011/5/24 Robert Klemme : >> sprintf("  %-20s %20s", "#{key.to_s}:", value.to_s) > > That's overly complicated: you employ two text replacement mechanisms.  Just do > > printf("  %-20s: %20s\n", key, value) Yes, initially I used key.to_s as I have Symbols as keys and thougth that a string is required. Changed now. Thanks. -- Iñaki Baz Castillo