summaryrefslogtreecommitdiff
path: root/include/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/intern.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index 29fa2c2a2c..3d63c3877b 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -597,6 +597,13 @@ VALUE rb_str_length(VALUE);
rb_usascii_str_new(str, strlen(str)) : \
rb_usascii_str_new2(str); \
})
+#define rb_str_buf_new2(str) __extension__ ( \
+{ \
+ (__builtin_constant_p(str)) ? \
+ rb_str_buf_cat(rb_str_buf_new(strlen(str)), \
+ str, strlen(str)) : \
+ rb_str_buf_new2(str); \
+})
#define rb_str_buf_cat2(str, ptr) __extension__ ( \
{ \
(__builtin_constant_p(ptr)) ? \