aboutsummaryrefslogtreecommitdiffstats
path: root/bignum.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-01 22:04:35 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-01 22:04:35 +0000
commit0effd061224edfb2c643e699a22057c03b4db3f8 (patch)
tree52f7e76797f01d36adaf7e0c41d18a2da15ade8f /bignum.c
parentc48e169fb9b2e632aa21e8338862fc45e5476379 (diff)
downloadruby-0effd061224edfb2c643e699a22057c03b4db3f8.tar.gz
* bignum.c (Init_Bignum): Define Bignum::GMP_VERSION when GMP is used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bignum.c b/bignum.c
index 32842ba36c..9bebf7224a 100644
--- a/bignum.c
+++ b/bignum.c
@@ -6752,5 +6752,9 @@ Init_Bignum(void)
rb_define_method(rb_cBignum, "odd?", rb_big_odd_p, 0);
rb_define_method(rb_cBignum, "even?", rb_big_even_p, 0);
+#ifdef USE_GMP
+ rb_define_const(rb_cBignum, "GMP_VERSION", rb_sprintf("GMP %s", gmp_version));
+#endif
+
power_cache_init();
}