summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/variable.c b/variable.c
index 15c75eba46..506657e6e0 100644
--- a/variable.c
+++ b/variable.c
@@ -1289,8 +1289,7 @@ rb_autoload(mod, id, file)
tbl = check_autoload_table(av);
}
else {
- av = Data_Wrap_Struct(rb_cData, rb_mark_tbl, st_free_table, 0);
- RBASIC(av)->klass = 0;
+ av = Data_Wrap_Struct(0 , rb_mark_tbl, st_free_table, 0);
st_add_direct(tbl, autoload, av);
DATA_PTR(av) = tbl = st_init_numtable();
}
@@ -1356,7 +1355,7 @@ autoload_file(mod, id)
}
file = ((NODE *)load)->nd_lit;
Check_Type(file, T_STRING);
- if (!RSTRING(file)->ptr) {
+ if (!RSTRING(file)->ptr || !*RSTRING(file)->ptr) {
rb_raise(rb_eArgError, "empty file name");
}
if (!rb_provided(RSTRING(file)->ptr)) {