mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 18:29:53 +00:00
ruby: improves compatibility with JRuby
This commit is contained in:
parent
96bb4cf49d
commit
f50694cc96
2 changed files with 38 additions and 12 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue