summaryrefslogtreecommitdiff
path: root/ruby/src/IceRuby/Config.h
diff options
context:
space:
mode:
Diffstat (limited to 'ruby/src/IceRuby/Config.h')
-rw-r--r--ruby/src/IceRuby/Config.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/ruby/src/IceRuby/Config.h b/ruby/src/IceRuby/Config.h
index daf7e65423a..f8117b4d554 100644
--- a/ruby/src/IceRuby/Config.h
+++ b/ruby/src/IceRuby/Config.h
@@ -87,4 +87,15 @@ typedef VALUE(*ICE_RUBY_ENTRY_POINT)(...);
# define RFLOAT_VALUE(v) RFLOAT(v)->value
#endif
+//
+// The RARRAY_AREF and RARRAY_ASET macros were added in Ruby 2.1.
+//
+#ifndef RARRAY_AREF
+# define RARRAY_AREF(a, i) (RARRAY_PTR(a)[i])
+#endif
+
+#ifndef RARRAY_ASET
+# define RARRAY_ASET(a, i, v) RARRAY_PTR(a)[i] = v
+#endif
+
#endif