mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
rb_class_real never returns Qnil
This commit is contained in:
parent
bca8952fc7
commit
6944b927bd
1 changed files with 1 additions and 1 deletions
2
load.c
2
load.c
|
@ -1234,7 +1234,7 @@ static VALUE
|
|||
rb_f_autoload(VALUE obj, VALUE sym, VALUE file)
|
||||
{
|
||||
VALUE klass = rb_class_real(rb_vm_cbase());
|
||||
if (NIL_P(klass)) {
|
||||
if (!klass) {
|
||||
rb_raise(rb_eTypeError, "Can not set autoload on singleton class");
|
||||
}
|
||||
return rb_mod_autoload(klass, sym, file);
|
||||
|
|
Loading…
Add table
Reference in a new issue