Method: Rugged.libgit2_version
- Defined in:
- ext/rugged/rugged.c
.libgit2_version ⇒ Object
Returns an array representing the current libgit2 version in use. Using the array makes it easier for the end-user to take conditional actions based on each respective version attribute: major, minor, rev.
Rugged.libgit2_version #=> [0, 17, 0]
66 67 68 69 70 71 72 73 74 75 76 |
# File 'ext/rugged/rugged.c', line 66
static VALUE rb_git_libgit2_version(VALUE self)
{
int major;
int minor;
int rev;
git_libgit2_version(&major, &minor, &rev);
// We return an array of three elements to represent the version components
return rb_ary_new3(3, INT2NUM(major), INT2NUM(minor), INT2NUM(rev));
}
|