> pwdFiles.push(entry) if File.file?(entry) == true
While not an answer to your question, I thought I'd comment on the line
above -- you don't need to add the "== true".
pwdFiles.push(entry) if File.file?(entry)
A little more:
Now, this is just me, but I also try to avoid writing negative logic...
if I wanted only the items where File.file?(entry) was false, I would
write:
pwdFiles.push(entry) unless File.file?(entry)
instead of
pwdFiles.push(entry) if not File.file?(entry)
or
pwdFiles.push(entry) if File.file?(entry) == false
Please note: this is all just personal preference -- your code will work
just fine. I only mention it as you indicated you were new, and I
thought I'd share.
--
Posted via http://www.ruby-forum.com/.