Class: Module

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#name=(o) ⇒ Object



4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
# File 'ext/primitive/primitive.c', line 4313

static VALUE
r_Module_set_name(VALUE self, VALUE o)
{
  if (TYPE(o) != T_STRING)
    rb_raise(rb_eTypeError, "expected string");
  char *p = RSTRING_PTR(o);
  long len = RSTRING_LEN(o);
  ID id = rb_intern2(p, len);
  rb_name_class(self, id);
  return Qnil;
}