diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-10-09 01:21:10 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-10-09 11:49:13 +0900 |
commit | 6944b927bdaaa9c27407eaa5ce411b9bad75af5b (patch) | |
tree | 7c438d9a9d8edaf8e812c949faf761f9bcb0ffec /load.c | |
parent | bca8952fc7e31e3d325e70368db2c83f4f701709 (diff) |
rb_class_real never returns Qnil
Diffstat (limited to 'load.c')
-rw-r--r-- | load.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |