Navigation Menu

Skip to content

Commit

Permalink
need write barrier for Rational's numerator/denominator in Rational#m…
Browse files Browse the repository at this point in the history
…arshal_load
  • Loading branch information
Watson1978 committed Jul 13, 2012
1 parent 05b2ebd commit 851f216
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rational.c
Expand Up @@ -1584,8 +1584,8 @@ nurat_marshal_load(VALUE self, SEL sel, VALUE a)
{
get_dat1(self);
VALUE ary = rb_convert_type(a, T_ARRAY, "Array", "to_ary");
dat->num = RARRAY_AT(ary, 0);
dat->den = RARRAY_AT(ary ,1);
GC_WB(&dat->num, RARRAY_AT(ary, 0));
GC_WB(&dat->den, RARRAY_AT(ary ,1));
rb_copy_generic_ivar(self, ary);
if (f_zero_p(dat->den)) {
rb_raise_zerodiv();
Expand Down

0 comments on commit 851f216

Please sign in to comment.