From: ts Date: 2001-08-31T17:34:16+09:00 Subject: [ruby-talk:20610] Re: Relative path >>>>> "R" == Ryan Tarpine writes: R> Also: "/".split("/").length == 0, but "/a".split("/a").length == 2. In R> the second one, there is an empty string for the first element. Should the R> first one act the same (return an array with a single element, an empty R> string)? When you call #split without a value for the parameter limit, ruby remove all empty strings at the end of the array. This is why "/".split("/") give an empty array. With, for example, limit = -1 you have pigeon% ruby -e 'p "/".split("/", -1).length' 2 pigeon% pigeon% ruby -e 'p "a/".split("/", -1).length' 2 pigeon% Guy Decoux