diff options
Diffstat (limited to 'ext/-test-/string/rb_interned_str.c')
-rw-r--r-- | ext/-test-/string/rb_interned_str.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/-test-/string/rb_interned_str.c b/ext/-test-/string/rb_interned_str.c new file mode 100644 index 0000000000..47643ec249 --- /dev/null +++ b/ext/-test-/string/rb_interned_str.c @@ -0,0 +1,14 @@ +#include "ruby.h" + +static VALUE +bug_rb_interned_str_dup(VALUE self, VALUE str) +{ + Check_Type(str, T_STRING); + return rb_interned_str(RSTRING_PTR(str), RSTRING_LEN(str)); +} + +void +Init_string_rb_interned_str(VALUE klass) +{ + rb_define_singleton_method(klass, "rb_interned_str_dup", bug_rb_interned_str_dup, 1); +} |