2011-07-07 02:40:33 -04:00
|
|
|
#include "ruby.h"
|
|
|
|
|
|
|
|
VALUE
|
|
|
|
bug_str_modify(VALUE str)
|
|
|
|
{
|
|
|
|
rb_str_modify(str);
|
|
|
|
return str;
|
|
|
|
}
|
|
|
|
|
2012-02-08 08:30:04 -05:00
|
|
|
VALUE
|
|
|
|
bug_str_modify_expand(VALUE str, VALUE expand)
|
|
|
|
{
|
|
|
|
rb_str_modify_expand(str, NUM2LONG(expand));
|
|
|
|
return str;
|
|
|
|
}
|
|
|
|
|
2011-07-07 02:40:33 -04:00
|
|
|
void
|
2017-12-03 03:02:56 -05:00
|
|
|
Init_string_modify(VALUE klass)
|
2011-07-07 02:40:33 -04:00
|
|
|
{
|
|
|
|
rb_define_method(klass, "modify!", bug_str_modify, 0);
|
2012-02-08 08:30:04 -05:00
|
|
|
rb_define_method(klass, "modify_expand!", bug_str_modify_expand, 1);
|
2011-07-07 02:40:33 -04:00
|
|
|
}
|