From: djberg96@... (Daniel Berger) Date: 2004-10-17T09:44:25+09:00 Subject: How to alias new() in the new allocation framework Hi all, What is the proper way to alias "new" in a C extension using the new allocation framework? In other words, I want Foo.open to be an alias to Foo.new. // A basic Foo class static VALUE foo_allocate(VALUE klass){ ... } VALUE foo_init(int argc, VALUE *argv, VALUE self){ ... } void Init_foo(){ ... rb_define_alloc_func(cFoo,foo_allocate); rb_define_method(cFoo,"initialize",foo_init,-1); } Since there is no "new" method, how do create a class method that's an alias to allocate() + initialize()? Or do I have to write it out manually myself? Regards, Dan