From 0effd061224edfb2c643e699a22057c03b4db3f8 Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 1 Sep 2013 22:04:35 +0000 Subject: [PATCH] * 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 --- ChangeLog | 4 ++++ bignum.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index a895ba365d..406e275a57 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Sep 2 07:02:10 2013 Tanaka Akira + + * bignum.c (Init_Bignum): Define Bignum::GMP_VERSION when GMP is used. + Mon Sep 2 01:46:14 2013 Tanaka Akira * bignum.c (big2str_generic): Reduce arguments. 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(); }