From: Harpo Date: 2005-12-10T18:27:37+09:00 Subject: Re: rb_str_replace not public? Daniel Berger wrote: > Hi all, Hi, > > I wanted to use rb_str_replace for a destructive method in a C > extension I'm using. However, it doesn't appear to be public. Why > not? And what should I use instead? > > I poked around intern.h a bit, and saw a few potential candidates, but > wasn't sure if there was a suitable replacement. I suppose I could > use rb_funcall, but that seems wrong, given that I know rb_str_replace > exists in string.c. Why not simply : VALUE str1; // string to replace VALUE str2; // replacement string str1 = str2; [ or, if you want a different object ] str1 = rb_str_dup( str2 ); Maybe I missed something... -- jigmepema wanadoo fr