aboutsummaryrefslogtreecommitdiffstats
path: root/include/ruby/ruby.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ruby/ruby.h')
-rw-r--r--include/ruby/ruby.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 57610a5bd6..a472ea9b27 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -830,6 +830,12 @@ VALUE rb_id2str(ID);
(__builtin_constant_p(str) ? \
__extension__ (CONST_ID_CACHE(/**/, str)) : \
rb_intern(str))
+#define rb_intern_const(str) \
+ (__builtin_constant_p(str) ? \
+ __extension__ (rb_intern2(str, strlen(str))) : \
+ (rb_intern)(str))
+#else
+#define rb_intern_const(str) rb_intern2(str, strlen(str))
#endif
const char *rb_class2name(VALUE);