diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-27 13:12:39 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-27 13:12:39 +0000 |
commit | 42921458ff7eacd1ef614c3e67596c75ccd0a1d4 (patch) | |
tree | 710c40988e51715f84a12c3295162b1c5697bf51 /spec/ruby/optional/capi/ext/bignum_spec.c | |
parent | a53ee2136ff59ebc54ae6c98a500765bc3d13d44 (diff) |
Update to ruby/spec@e57f49c
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/optional/capi/ext/bignum_spec.c')
-rw-r--r-- | spec/ruby/optional/capi/ext/bignum_spec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/ruby/optional/capi/ext/bignum_spec.c b/spec/ruby/optional/capi/ext/bignum_spec.c index a773e06436..14a51f5099 100644 --- a/spec/ruby/optional/capi/ext/bignum_spec.c +++ b/spec/ruby/optional/capi/ext/bignum_spec.c @@ -31,6 +31,10 @@ static VALUE bignum_spec_rb_big2ulong(VALUE self, VALUE num) { return ULONG2NUM(rb_big2ulong(num)); } +static VALUE bignum_spec_RBIGNUM_SIGN(VALUE self, VALUE val) { + return INT2FIX(RBIGNUM_SIGN(val)); +} + static VALUE bignum_spec_rb_big_cmp(VALUE self, VALUE x, VALUE y) { return rb_big_cmp(x, y); } @@ -90,6 +94,7 @@ void Init_bignum_spec(void) { rb_define_method(cls, "rb_big2long", bignum_spec_rb_big2long, 1); rb_define_method(cls, "rb_big2str", bignum_spec_rb_big2str, 2); rb_define_method(cls, "rb_big2ulong", bignum_spec_rb_big2ulong, 1); + rb_define_method(cls, "RBIGNUM_SIGN", bignum_spec_RBIGNUM_SIGN, 1); rb_define_method(cls, "rb_big_cmp", bignum_spec_rb_big_cmp, 2); rb_define_method(cls, "rb_big_pack", bignum_spec_rb_big_pack, 1); rb_define_method(cls, "rb_big_pack_array", bignum_spec_rb_big_pack_array, 2); |