ruby-changes:30688
From: akr <ko1@a...>
Date: Mon, 2 Sep 2013 07:04:48 +0900 (JST)
Subject: [ruby-changes:30688] akr:r42767 (trunk): * bignum.c (Init_Bignum): Define Bignum::GMP_VERSION when GMP is used.
akr 2013-09-02 07:04:35 +0900 (Mon, 02 Sep 2013) New Revision: 42767 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42767 Log: * bignum.c (Init_Bignum): Define Bignum::GMP_VERSION when GMP is used. Modified files: trunk/ChangeLog trunk/bignum.c Index: ChangeLog =================================================================== --- ChangeLog (revision 42766) +++ ChangeLog (revision 42767) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Sep 2 07:02:10 2013 Tanaka Akira <akr@f...> + + * bignum.c (Init_Bignum): Define Bignum::GMP_VERSION when GMP is used. + Mon Sep 2 01:46:14 2013 Tanaka Akira <akr@f...> * bignum.c (big2str_generic): Reduce arguments. Index: bignum.c =================================================================== --- bignum.c (revision 42766) +++ bignum.c (revision 42767) @@ -6752,5 +6752,9 @@ Init_Bignum(void) https://github.com/ruby/ruby/blob/trunk/bignum.c#L6752 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(); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/