From 1978f5b7042f47152f10dfe6a562ad04f461ad1c Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Tue, 12 Nov 2024 15:54:42 +0100 Subject: [PATCH] Remove outdated JRUBY ifdefs This is no longer used since now there's a Java version of the gem. --- ext/msgpack/packer.h | 4 ---- ext/msgpack/unpacker_class.c | 6 ------ 2 files changed, 10 deletions(-) diff --git a/ext/msgpack/packer.h b/ext/msgpack/packer.h index 1fedcb7b..5061b40c 100644 --- a/ext/msgpack/packer.h +++ b/ext/msgpack/packer.h @@ -453,11 +453,7 @@ static inline void msgpack_packer_write_symbol_value(msgpack_packer_t* pk, VALUE static inline void msgpack_packer_write_fixnum_value(msgpack_packer_t* pk, VALUE v) { -#ifdef JRUBY - msgpack_packer_write_long(pk, FIXNUM_P(v) ? FIX2LONG(v) : rb_num2ll(v)); -#else msgpack_packer_write_long(pk, FIX2LONG(v)); -#endif } static inline void msgpack_packer_write_bignum_value(msgpack_packer_t* pk, VALUE v) diff --git a/ext/msgpack/unpacker_class.c b/ext/msgpack/unpacker_class.c index 99ed7bbe..429fc1af 100644 --- a/ext/msgpack/unpacker_class.c +++ b/ext/msgpack/unpacker_class.c @@ -284,12 +284,6 @@ static VALUE Unpacker_each_impl(VALUE self) raise_unpacker_error(uk, r); } VALUE v = msgpack_unpacker_get_last_object(uk); -#ifdef JRUBY - /* TODO JRuby's rb_yield behaves differently from Ruby 1.9.3 or Rubinius. */ - if(rb_type(v) == T_ARRAY) { - v = rb_ary_new3(1, v); - } -#endif rb_yield(v); } }