From a141f9cbbdc92ce1ce4877878d0a2db9eed93e9e Mon Sep 17 00:00:00 2001 From: Jacob Buys Date: Wed, 30 May 2012 22:36:19 +0200 Subject: [PATCH] Fix test that fails on 1.9 due to behaviour of String#start_with? On ruby 1.9, the argument of String#start_with? does not automatically get coerced into a string. In Homesick#clone, we use start_with? with a Pathname instance, which now always returns false. --- lib/homesick.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/homesick.rb b/lib/homesick.rb index 09647f9..f19aca9 100644 --- a/lib/homesick.rb +++ b/lib/homesick.rb @@ -22,7 +22,7 @@ class Homesick < Thor destination = nil if File.exist?(uri) uri = Pathname.new(uri).expand_path - if uri.to_s.start_with?(repos_dir) + if uri.to_s.start_with?(repos_dir.to_s) raise "Castle already cloned to #{uri}" end