summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
Diffstat (limited to 'load.c')
-rw-r--r--load.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/load.c b/load.c
index 1928721c9e..9a1ff53f54 100644
--- a/load.c
+++ b/load.c
@@ -1434,7 +1434,7 @@ rb_require_internal(VALUE fname)
int
ruby_require_internal(const char *fname, unsigned int len)
{
- struct RString fake;
+ struct RString fake = {RBASIC_INIT};
VALUE str = rb_setup_fake_str(&fake, fname, len, 0);
rb_execution_context_t *ec = GET_EC();
int result = require_internal(ec, str, 0, RTEST(ruby_verbose));
@@ -1476,7 +1476,7 @@ rb_require_string_internal(VALUE fname, bool resurrect)
VALUE
rb_require(const char *fname)
{
- struct RString fake;
+ struct RString fake = {RBASIC_INIT};
VALUE str = rb_setup_fake_str(&fake, fname, strlen(fname), 0);
return rb_require_string_internal(str, true);
}