mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-29 12:18:03 +01:00
ruby: improves compatibility with JRuby
This commit is contained in:
@@ -113,7 +113,11 @@ static VALUE MessagePack_FalseClass_to_msgpack(int argc, VALUE *argv, VALUE self
|
||||
static VALUE MessagePack_Fixnum_to_msgpack(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
ARG_BUFFER(out, argc, argv);
|
||||
#ifdef JRUBY
|
||||
msgpack_pack_long(out, rb_num2long(self));
|
||||
#else
|
||||
msgpack_pack_long(out, FIX2LONG(self));
|
||||
#endif
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user