Skip to content

Commit

Permalink
verify string is a string
Browse files Browse the repository at this point in the history
  • Loading branch information
pjhyett committed Sep 8, 2008
1 parent d24cfd8 commit 2161be4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/grit/git-ruby.rb
Expand Up @@ -65,7 +65,9 @@ def rev_list(options, ref = 'master')
end
end

def rev_parse(options, string)
def rev_parse(options, string)
string = string.to_s

if string =~ /\.\./
(sha1, sha2) = string.split('..')
return [rev_parse({}, sha1), rev_parse({}, sha2)]
Expand Down

0 comments on commit 2161be4

Please sign in to comment.