From: "C.E. Thornton" Date: 2008-07-19T01:36:30+09:00 Subject: [ruby-core:17834] Tested expand_path failure with 1.8.7 --- Same Results Core, Expand_path() also fails with the latest 1.8.7. How do I download the latest 1.8 and 1.9 branches to do further tests! The results: The Program =========== #!/usr/bin/ruby # a = Dir.entries(Dir.getwd) # a.each do |x| if File.stat(x).ftype.include?("directory") if ARGV[0] =~ /^w/ f = File.expand_path(File.dirname(x)) # Necessary because of expand_path failure!! f += ('/' + x) # Because of filenames of form '~name' else f = File.expand_path(x) end puts "Dir = #{f}" end end hydra(Wpad02}$x tst.rb TEST 1 - Failure ============================= hydra(Wpad02}$tst.rb ruby 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux] ./tst.rb:11:in `expand_path': user test doesn't exist (ArgumentError) from ./tst.rb:11 from ./tst.rb:5:in `each' from ./tst.rb:5 TEST 2 - Success ============================= hydra(Wpad02}$tst.rb w ruby 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux] Dir = /home/thornton/WorkPads/Wpad02/~test Dir = /home/thornton/WorkPads/Wpad02/t~st Dir = /home/thornton/WorkPads/Wpad02/.. Dir = /home/thornton/WorkPads/Wpad02/ATTIC Dir = /home/thornton/WorkPads/Wpad02/test Dir = /home/thornton/WorkPads/Wpad02/. Contents of Test Dir ================ hydra(Wpad02}$ls ATTIC test ~test t~st tst.rb -- Competency and chastity have much in common, they both encompass their own punishment! -- C.E. Thornton -- Hawthorne Press --