Hi all,
I wanted to simply add files to an array. The files must match a
pattern. I'm just starting with ruby so I really have to find my way in
it. I tried something like:
dir = "/home/leon/images"
test = Array.new
test << Dir.new(dir).entries.each { |x| if 1 == 1 }
Then I wanted to add a sort of if to that last line with a block ( I
think I have to use a block).
I tried this in irb, but it doesn't give an error.
What am I doing wrong here?
Thanks in advance!
···
--
Posted via http://www.ruby-forum.com/.