From: Daniel Berger Date: 2005-08-30T05:57:16+09:00 Subject: File.join edge cases Hi all, Ruby 1.8.2 Solaris 10 Here are some edge cases I thought were interesting... File.join("") # "" - ok File.join("", "") # "/" - huh? File.join(nil) # "" - expected a TypeError File.join(nil, nil) # "/" - wha..? again, expected a TypeError File.join(1,2) # "1/2" - expected a TypeError File.join("/") # "/" - hrm, ok, but... File.join("/", "/") # "//" - could be smarter I'm surprised that File.join stringifies all of its arguments. May I ask why that approach was taken? Mainly I posted this just to see what folks thought about it. Regards, Dan