Skip to content

Commit 13d4469

Browse files
authored
Merge pull request #377 from msgpack/remove-ifdef-jruby
Remove outdated JRUBY ifdefs
2 parents 2a92ffb + 1978f5b commit 13d4469

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

ext/msgpack/packer.h

-4
Original file line numberDiff line numberDiff line change
@@ -453,11 +453,7 @@ static inline void msgpack_packer_write_symbol_value(msgpack_packer_t* pk, VALUE
453453

454454
static inline void msgpack_packer_write_fixnum_value(msgpack_packer_t* pk, VALUE v)
455455
{
456-
#ifdef JRUBY
457-
msgpack_packer_write_long(pk, FIXNUM_P(v) ? FIX2LONG(v) : rb_num2ll(v));
458-
#else
459456
msgpack_packer_write_long(pk, FIX2LONG(v));
460-
#endif
461457
}
462458

463459
static inline void msgpack_packer_write_bignum_value(msgpack_packer_t* pk, VALUE v)

ext/msgpack/unpacker_class.c

-6
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,6 @@ static VALUE Unpacker_each_impl(VALUE self)
284284
raise_unpacker_error(uk, r);
285285
}
286286
VALUE v = msgpack_unpacker_get_last_object(uk);
287-
#ifdef JRUBY
288-
/* TODO JRuby's rb_yield behaves differently from Ruby 1.9.3 or Rubinius. */
289-
if(rb_type(v) == T_ARRAY) {
290-
v = rb_ary_new3(1, v);
291-
}
292-
#endif
293287
rb_yield(v);
294288
}
295289
}

0 commit comments

Comments
 (0)