summaryrefslogtreecommitdiff
path: root/ext/stringio
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-22 13:55:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-22 13:55:03 +0000
commit0130bb01baed404c0e3c75bd5db472415a6da1d3 (patch)
treec4f830cf87ab6c59d91bae386b46065097924816 /ext/stringio
parenteaf4f2ec854aab1d1421de4982d3d36c631e6c72 (diff)
stringio.c: RB_INTEGER_TYPE_P
* ext/stringio/stringio.c (RB_INTEGER_TYPE_P): fallback definition for 2.3 or earlier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/stringio')
-rw-r--r--ext/stringio/stringio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index 08524b4..826da86 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -20,6 +20,10 @@
#include <sys/fcntl.h>
#endif
+#ifndef RB_INTEGER_TYPE_P
+# define RB_INTEGER_TYPE_P(c) (FIXNUM_P(c) || RB_TYPE_P(c, T_BIGNUM))
+#endif
+
struct StringIO {
VALUE string;
rb_encoding *enc;