lsegal/yard — Issue #441: defining an alias of a class under a module fails. (rb_define_alias)
Author: kubo
Created: 2011-12-30 12:09:34+00:00
State: open

Defining an alias of a class under a module fails.
Here is a sample.

void Init_Foo_Bar() {
rb_mFoo = rb_define_module("Foo");
rb_cBar = rb_define_class_under(rb_mFoo, "Bar", rb_cObject);
rb_define_method(rb_cBar, "foo", foo, 1);
rb_define_alias(rb_cBar, "bar", "foo");
}

This gets an error:
.../lib/yard/code_objects/proxy.rb:218:in `rescue in method_missing': Proxy cannot call method #child on object 'Bar' (YARD::CodeObjects::ProxyMethodError)