From: trishna mohanty Date: 2012-10-31T15:06:40+09:00 Subject: A doubt about the Dir::[] class method Hi, I am learning Ruby from the poignant guide and in chapter 4 I came across the Dir::[] class method in a particular code snippet. I tried a few variations with the way this method is invoked : 1) Dir::['*d*'].each {|file_name| puts file_name} 2) Dir::[]('*d*').each {|file_name| puts file_name} 3) Dir.[]('*d*').each {|file_name| puts file_name} 4) Dir['*d*'].each {|file_name| puts file_name} The first call does not work but the remaining three do. I have not been able to figure out why any one these invocations works/does not work. Thanks. -- Posted via http://www.ruby-forum.com/.