aboutsummaryrefslogtreecommitdiffstats
path: root/marshal.c
diff options
context:
space:
mode:
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/marshal.c b/marshal.c
index d64e5ffc54..6639e03f45 100644
--- a/marshal.c
+++ b/marshal.c
@@ -1585,6 +1585,7 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
{
VALUE path = r_unique(arg);
VALUE m = rb_path_to_class(path);
+ if (NIL_P(extmod)) extmod = rb_ary_tmp_new(0);
if (RB_TYPE_P(m, T_CLASS)) { /* prepended */
VALUE c;
@@ -1604,7 +1605,6 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
}
else {
must_be_module(m, path);
- if (NIL_P(extmod)) extmod = rb_ary_tmp_new(0);
rb_ary_push(extmod, m);
v = r_object0(arg, 0, extmod);