about summary refs log tree commit homepage
path: root/ext/kgio/kgio.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/kgio/kgio.h')
-rw-r--r--ext/kgio/kgio.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/kgio/kgio.h b/ext/kgio/kgio.h
index 4ccd7c2..6c5da5b 100644
--- a/ext/kgio/kgio.h
+++ b/ext/kgio/kgio.h
@@ -96,4 +96,10 @@ static inline void kgio_autopush_write(VALUE io) { }
 #else
 static inline void kgio_autopush_write(VALUE io) { kgio_autopush_send(io); }
 #endif
+
+/* prefer rb_str_subseq because we don't use negative offsets */
+#ifndef HAVE_RB_STR_SUBSEQ
+#define rb_str_subseq rb_str_substr
+#endif
+
 #endif /* KGIO_H */