They almost surely did not implement Git in Ruby, but merely wrote bindings to it. I used to remember reading through their Ruby source code for this (Edit: found it, it's called Rugged). But even then, you need a more efficient API layer for this binding to be more practical for programmers, hence the libgit2.