From: "Iñaki Baz Castillo" Date: 2010-01-31T06:25:11+09:00 Subject: Re: Refining the use of file joins or file expand_path El Sábado, 30 de Enero de 2010, Alpha Blue escribió: > Both bits of code process the same result which is finding .rb file > extensions within a specified relative path. > > The question I have (because I have written used both) is which would > "you" use and why keeping the following in mind... > > Ruby 1.9.x > Cross - OS usability (windows/linux/mac/etc.) > > Dir[File.join(File.dirname(__FILE__),"..","ui","*.rb")].each {|rb_files| > load rb_files} > > Dir[File.expand_path('../../ui/*.rb', __FILE__)].each {|rb_files| load > rb_files} I prefer the first one. -- Iñaki Baz Castillo