Skip to content

Commit 8175252

Browse files
committed
Remove references to FL_EXIVAR
This flag isn't really meant to be public, it's an implementation detail of Ruby. And checking it before calling `rb_copy_generic_ivar` only save a function call.
1 parent b28617c commit 8175252

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

ext/date/date_core.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7517,10 +7517,7 @@ d_lite_marshal_dump_old(VALUE self)
75177517
m_of_in_day(dat),
75187518
DBL2NUM(m_sg(dat)));
75197519

7520-
if (FL_TEST(self, FL_EXIVAR)) {
7521-
rb_copy_generic_ivar(a, self);
7522-
FL_SET(a, FL_EXIVAR);
7523-
}
7520+
rb_copy_generic_ivar(a, self);
75247521

75257522
return a;
75267523
}
@@ -7542,10 +7539,8 @@ d_lite_marshal_dump(VALUE self)
75427539
INT2FIX(m_of(dat)),
75437540
DBL2NUM(m_sg(dat)));
75447541

7545-
if (FL_TEST(self, FL_EXIVAR)) {
7546-
rb_copy_generic_ivar(a, self);
7547-
FL_SET(a, FL_EXIVAR);
7548-
}
7542+
7543+
rb_copy_generic_ivar(a, self);
75497544

75507545
return a;
75517546
}
@@ -7618,10 +7613,7 @@ d_lite_marshal_load(VALUE self, VALUE a)
76187613
HAVE_JD | HAVE_DF);
76197614
}
76207615

7621-
if (FL_TEST(a, FL_EXIVAR)) {
7622-
rb_copy_generic_ivar(self, a);
7623-
FL_SET(self, FL_EXIVAR);
7624-
}
7616+
rb_copy_generic_ivar(a, self);
76257617

76267618
return self;
76277619
}

0 commit comments

Comments
 (0)