From: Mike Date: 2001-05-16T22:24:46+09:00 Subject: [ruby-talk:15271] ftools: File.catname bug? Hello, File.catname does not handle properly a destination if it contains an ending slash or backslash: irb(main):002:0> File.catname "hello", "/usr" "/usr/hello" irb(main):003:0> File.catname "hello", "/usr/hello" "/usr/hello" irb(main):004:0> File.catname "hello", "/usr/" NameError: undefined method `+' for nil /usr/local/lib/ruby/1.6/ftools.rb:11:in `catname' (irb):4:in `irb_binding' irb(main):005:0> Line 11 is: if to[-1,1] != '/' then '/' end + basename(from) but it should be something like: if to[-1,1] != '/' then '/' else '' end + basename(from) or if to[-1,1] != '/' then '/' + basename(from) else basename(from) end The same fix must be applied on line 9 (which is the antislash case). Mike.