Skip to content

Commit

Permalink
Remove outdated JRUBY ifdefs
Browse files Browse the repository at this point in the history
This is no longer used since now there's a Java version
of the gem.
  • Loading branch information
byroot committed Nov 12, 2024
1 parent 2a92ffb commit 1978f5b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
4 changes: 0 additions & 4 deletions ext/msgpack/packer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 0 additions & 6 deletions ext/msgpack/unpacker_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 1978f5b

Please sign in to comment.