mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 04:52:59 +01:00
ruby: FIXNUM_P(self) may be false in Fixnum on JRuby
This commit is contained in:
parent
f50694cc96
commit
bbaf8c2f67
@ -114,7 +114,7 @@ static VALUE MessagePack_Fixnum_to_msgpack(int argc, VALUE *argv, VALUE self)
|
|||||||
{
|
{
|
||||||
ARG_BUFFER(out, argc, argv);
|
ARG_BUFFER(out, argc, argv);
|
||||||
#ifdef JRUBY
|
#ifdef JRUBY
|
||||||
msgpack_pack_long(out, rb_num2long(self));
|
msgpack_pack_long(out, FIXNUM_P(self) ? FIX2LONG(self) : rb_num2ll(self));
|
||||||
#else
|
#else
|
||||||
msgpack_pack_long(out, FIX2LONG(self));
|
msgpack_pack_long(out, FIX2LONG(self));
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user