You can also use Dir[] instead of Dir.glob()

And you can build your variable before passing it to Dir[] such as via

  x = 'foo/'
  x << '*'
  Dir[x]

-- 
Posted via http://www.ruby-forum.com/.