2006/6/17, Robert Dober <robert.dober / gmail.com>:

> > [1, 114, 3, 2].map{|n| "%04x" %n}.join

A bit more efficient

irb(main):005:0> a.inject("") {|s,i| s << "%04x" % i}
=> "0001007200030002"

Kind regards

robert

-- 
Have a look: http://www.flickr.com/photos/fussel-foto/