diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-02-19 18:45:06 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-02-21 09:50:02 +0000 |
commit | d13879f862a98e718ba7ec40e8d43137efb97a8b (patch) | |
tree | 02945baaa60afc3a5fb8fb90fcb8d9c2065bb0c4 /ext/bigdecimal/bigdecimal.c | |
parent | cb40432c74b9c5f785e8be53cbda981a64d47c72 (diff) |
[ruby/bigdecimal] Read version from bigdecimal.c
The dependency of extconf.h on bigdecimal.gemspec does not make sense
as far as no rule is defined for it. Also, the relationship between
extension library and gemspec file is various in default gems, and
does not work well.
https://github.com/ruby/bigdecimal/commit/7f99b28552
Diffstat (limited to 'ext/bigdecimal/bigdecimal.c')
-rw-r--r-- | ext/bigdecimal/bigdecimal.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index 637e824af5..24f299d248 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -31,6 +31,8 @@ #include "bits.h" #include "static_assert.h" +#define BIGDECIMAL_VERSION "3.1.3" + /* #define ENABLE_NUMERIC_STRING */ #define SIGNED_VALUE_MAX INTPTR_MAX @@ -4402,13 +4404,10 @@ Init_bigdecimal(void) /* Constants definition */ -#ifndef RUBY_BIGDECIMAL_VERSION -# error RUBY_BIGDECIMAL_VERSION is not defined -#endif /* * The version of bigdecimal library */ - rb_define_const(rb_cBigDecimal, "VERSION", rb_str_new2(RUBY_BIGDECIMAL_VERSION)); + rb_define_const(rb_cBigDecimal, "VERSION", rb_str_new2(BIGDECIMAL_VERSION)); /* * Base value used in internal calculations. On a 32 bit system, BASE |