Skip to content

Commit

Permalink
Merge pull request #377 from msgpack/remove-ifdef-jruby
Browse files Browse the repository at this point in the history
Remove outdated JRUBY ifdefs
  • Loading branch information
byroot authored Nov 12, 2024
2 parents 2a92ffb + 1978f5b commit 13d4469
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 13d4469

Please sign in to comment.