ttilley/fssm — pull request #45 by kou1okada (2014-02-13 15:17:24+00:00)
Title: Fixed FSSM::Pathname.segments method to work correctly.

Maybe, this problem occurs only under the cygwin environment.
The FSSM::Pathname.segments method did not work correctly. Therefore reconnection with join method failed to insert File::SEPARA

This problem makes failure for watch sub-command of compass (http://compass-style.org/).

before:

FSSM::Pathname.for("/tmp/foo").segments
# => ["//", "tmp", "foo"]
FSSM::Pathname.for("/tmp/foo").join("bar")
# => #
# OK, no problem. But a result of segments is a little bit strange.

FSSM::Pathname.for("//host/share/foo").segments
# => ["//", "host", "share", "foo"]
FSSM::Pathname.for("//host/share/foo").join("bar")
# => #
# OK, no problem. But a result of segments is a little bit strange.

cache = FSSM::Tree::Cache.new
# => #
cache.set "/tmp/foo"
# => 2014-02-13 23:20:19 +0900
cache.files
# => {"//tmpfoo"=>2014-02-13 23:20:19 +0900}
# Oops!!! The path is corrupted. It's a problem!!!

after:

FSSM::Pathname.for("/tmp/foo").segments
# => ["/", "tmp", "foo"]
FSSM::Pathname.for("/tmp/foo").join("bar")
# => #
# OK, no problem. A result of segments is also reasonable.

FSSM::Pathname.for("//host/share/foo").segments
# => ["//host/share", "foo"]
FSSM::Pathname.for("//host/share/foo").join("bar")
# => #
# OK, no problem. A result of segments is also reasonable.

cache = FSSM::Tree::Cache.new
# => #
cache.set "/tmp/foo"
# => 2014-02-13 23:20:19 +0900
cache.files
# => {"/tmp/foo"=>2014-02-13 23:20:19 +0900}
# OK, fixed a problem.