Debian Codegraph @

ext/-test-/string/modify.c

raw
1 #include "ruby.h"
2
3 VALUE
4 bug_str_modify(VALUE str)
5 {
6 rb_str_modify(str);
7 return str;
8 }
9
10 VALUE
11 bug_str_modify_expand(VALUE str, VALUE expand)
12 {
13 rb_str_modify_expand(str, NUM2LONG(expand));
14 return str;
15 }
16
17 void
18 Init_string_modify(VALUE klass)
19 {
20 rb_define_method(klass, "modify!", bug_str_modify, 0);
21 rb_define_method(klass, "modify_expand!", bug_str_modify_expand, 1);
22 }