From: Luke Bayes Date: 2007-06-13T12:15:08+09:00 Subject: Re: File.exists? ignores file extension on windows? As it turns out, I'm running ruby 1.8.5 and consistently reproduce the issue in both irb and running a ruby file. Here is the file that I'm running: ------------------------------8<------------------------------ require 'fileutils' base_name = 'fcsh' ext_name = 'fcsh.exe' if(File.exists?(ext_name)) File.delete(ext_name) end puts "Testing #{base_name}" puts "exists a: #{File.exists?(base_name)}" FileUtils.touch(ext_name) puts "exists b: #{File.exists?(base_name)}" puts "exists c: #{File.exists?(ext_name)}" => Testing fcsh => exists a: false => exists b: true => exists c: true ------------------------------>8------------------------------ I tried running it without using FileUtils, thinking maybe they had a mixin that was causing problems, but no difference. I'm really glad I had this old version because I'm planning on distributing this library to random end users that may very well also have this older version of Ruby! Thanks, Luke Bayes http://www.asserttrue.com