From: "Iñaki Baz Castillo" Date: 2011-05-24T20:50:44+09:00 Subject: Re: Using sprintf() to print a Hash 2011/5/24 Iñaki Baz Castillo : > ------------------------------------ > listen_ip:            1.2.3.4 > listen_port:               90 > use_tls:                  true > compression:         false > ------------------------------------ > > I'm trying to play with sprintf by using %20s and so, with no success. > Any help please? I've got the following output by using sprintf("%20s %20s", "#{key.to_s}:", value.to_s): ------------------------------------ listen_ip: 1.2.3.4 listen_port: 90 use_tls: true compression: false ------------------------------------ but it's not exactly what I need. Thanks a lot for any suggestion. -- Iñaki Baz Castillo