summaryrefslogtreecommitdiff
path: root/ext/json/generator/generator.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/generator/generator.h')
-rw-r--r--ext/json/generator/generator.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/json/generator/generator.h b/ext/json/generator/generator.h
index 7d429d5..b58cc4b 100644
--- a/ext/json/generator/generator.h
+++ b/ext/json/generator/generator.h
@@ -2,7 +2,6 @@
#define _GENERATOR_H_
#include <string.h>
-#include <assert.h>
#include <math.h>
#include <ctype.h>
@@ -14,6 +13,14 @@
#include "re.h"
#endif
+#ifndef rb_intern_str
+#define rb_intern_str(string) SYM2ID(rb_str_intern(string))
+#endif
+
+#ifndef rb_obj_instance_variables
+#define rb_obj_instance_variables(object) rb_funcall(object, rb_intern("instance_variables"), 0)
+#endif
+
#define option_given_p(opts, key) RTEST(rb_funcall(opts, i_key_p, 1, key))
/* unicode defintions */