From: Nikolai Weibull Date: 2011-07-05T23:13:20+09:00 Subject: [ruby-core:37798] Re: [Ruby 1.9 - Bug #4893] Literal Instantiation breaks Object Model On Tue, Jul 5, 2011 at 15:46, Lazaridis Ilias wrote: > * I do not use a "C global variable", but a class-object variable. > * There is no "global status", but a class-object status. The point is that it���s still a global. But that���s really beside the point. Why even have #call_initialize/#call_initialize=? Simply always invoke #initialize instead: diff --git a/string.c b/string.c index 711918b..8bdf650 100644 --- a/string.c +++ b/string.c @@ -409,7 +409,11 @@ str_new(VALUE klass, const char *ptr, long len) VALUE rb_str_new(const char *ptr, long len) { - return str_new(rb_cString, ptr, len); + VALUE str = str_new(rb_cString, ptr, len); + + rb_obj_call_init(str, 1, &str); + + return str; } VALUE I suspect that this modification (in whatever form it eventually ends up being) should also be done to rb_str_new_with_class().