diff --git a/lib/grit/index.rb b/lib/grit/index.rb
index <HASH>..<HASH> 100644
--- a/lib/grit/index.rb
+++ b/lib/grit/index.rb
@@ -12,7 +12,7 @@ class Grit::Index
   # @param [String] path The path to the file
   # @param [String] data The contents of the file
   def add(path, data)
-    is_dir = path[-1] == 47
+    is_dir = path[-1].chr == '/'
     path = path.split('/')
     filename = path.pop
     filename += '/' if is_dir
diff --git a/lib/silo/repository.rb b/lib/silo/repository.rb
index <HASH>..<HASH> 100644
--- a/lib/silo/repository.rb
+++ b/lib/silo/repository.rb
@@ -308,7 +308,7 @@ module Silo
     #        repository
     def remove(path)
       object = object! path
-      path += '/' if object.is_a?(Grit::Tree) && path[-1] != 47
+      path += '/' if object.is_a?(Grit::Tree) && path[-1].chr != '/'
       index = @git.index
       index.read_tree 'HEAD'
       index.delete path
Made removing dirs compatible with Ruby <I>

This includes the monkey patch for Grit