ext/-test-/string/rb_interned_str.c
raw| 1 | #include "ruby.h" |
| 2 | |
| 3 | static VALUE |
| 4 | bug_rb_interned_str_dup(VALUE self, VALUE str) |
| 5 | { |
| 6 | Check_Type(str, T_STRING); |
| 7 | return rb_interned_str(RSTRING_PTR(str), RSTRING_LEN(str)); |
| 8 | } |
| 9 | |
| 10 | void |
| 11 | Init_string_rb_interned_str(VALUE klass) |
| 12 | { |
| 13 | rb_define_singleton_method(klass, "rb_interned_str_dup", bug_rb_interned_str_dup, 1); |
| 14 | } |