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