[#1094] Re: [ruby-cvs] ruby, ruby/lib: * eval.c (ev_const_defined, ev_const_get), variable.c — Dave Thomas <dave@...>

> * eval.c (rb_mod_autoload, rb_mod_autoload_p): new method;

12 messages 2003/05/29
[#1095] Re: [ruby-cvs] ruby, ruby/lib: * eval.c (ev_const_defined, ev_const_get), variable.c — nobu.nokada@... 2003/05/29

Hi,

[1.8] allocate

From: ts <decoux@...>
Date: 2003-05-19 14:57:33 UTC
List: ruby-core #1065
 ruby don't like ::allocate

svg% cat tt.c
#include <ruby.h>

static VALUE
tt_s_alloc(VALUE obj)
{
    return rb_call_super(0, 0);
}

void Init_tt()
{
    VALUE tt_cTt = rb_define_class("Tt", rb_cArray);
    rb_define_alloc_func(tt_cTt, tt_s_alloc);
}
svg% 

svg% ruby -vrtt -e 'Tt.new'
ruby 1.8.0 (2003-05-13) [i686-linux]
-e:1:in `new': superclass method `(null)' must be enabled by rb_enable_super() (NameError)
        from -e:1
svg% 

 See (null)



Guy Decoux

In This Thread

Prev Next