summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-20 09:34:36 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-20 09:34:36 +0000
commitdcd87b140ccb208b6d73ef35474ce23affa6bc51 (patch)
tree6ba64d567e1ca399fa3abb2d73b66bf574076417 /variable.c
parent3f89d1660a120bbbcc26861f2b8fc72772e20f47 (diff)
* string.c (rb_str_new4): should propagate taintedness.
* struct.c (rb_struct_set): use original method name, not callee name, to retrieve member slot. [ruby-core:04268] * time.c (time_strftime): protect from format modification from GC finalizers. * gc.c (rb_data_object_alloc): klass may be NULL. [ruby-list:40498] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 15c75eb..506657e 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)) {