summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/variable.c b/variable.c
index 849be3a..d31066e 100644
--- a/variable.c
+++ b/variable.c
@@ -2028,7 +2028,7 @@ check_autoload_required(VALUE mod, ID id, const char **loadingpath)
}
file = ele->feature;
Check_Type(file, T_STRING);
- if (!RSTRING_PTR(file) || !*RSTRING_PTR(file)) {
+ if (!RSTRING_LEN(file) || !*RSTRING_PTR(file)) {
rb_raise(rb_eArgError, "empty file name");
}
loading = RSTRING_PTR(file);