Skip to content

Commit

Permalink
* pack.c (uv_to_utf8): change message to "out of range", since
Browse files Browse the repository at this point in the history
  negative values are not "too big". [ruby-dev21567]

* marshal.c (w_object): should pass the value of "weak" to
  w_object().  [ruby-dev:21555] and [ruby-dev:21561]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed Oct 9, 2003
1 parent 582b7e1 commit 0b2e94b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Thu Oct 9 15:45:27 2003 Yukihiro Matsumoto <[email protected]>

* pack.c (uv_to_utf8): change message to "out of range", since
negative values are not "too big". [ruby-dev21567]

* marshal.c (w_object): should pass the value of "weak" to
w_object(). [ruby-dev:21555] and [ruby-dev:21561]

Thu Oct 9 14:05:38 2003 Nobuyoshi Nakada <[email protected]>

* eval.c (rb_set_end_proc, rb_exec_end_proc): restore safe level.
Expand Down
4 changes: 3 additions & 1 deletion marshal.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,9 @@ w_object(obj, arg, limit, weak)
v = rb_funcall(obj, s_mdump, 0, 0);
w_byte(TYPE_USRMARSHAL, arg);
w_unique(rb_class2name(CLASS_OF(obj)), arg);
w_object(v, arg, limit, Qtrue);
w_object(v, arg, limit, weak);
c_arg.weak = Qtrue;
ivtbl = rb_generic_ivar_table(v);
if (ivtbl) w_ivar(ivtbl, &c_arg);
return;
}
Expand All @@ -507,6 +508,7 @@ w_object(obj, arg, limit, weak)
w_class(TYPE_USERDEF, obj, arg);
w_bytes(RSTRING(v)->ptr, RSTRING(v)->len, arg);
c_arg.weak = Qtrue;
ivtbl = rb_generic_ivar_table(v);
if (ivtbl) w_ivar(ivtbl, &c_arg);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,7 @@ uv_to_utf8(buf, uv)
buf[5] = (uv&0x3f)|0x80;
return 6;
}
rb_raise(rb_eArgError, "uv_to_utf8(); too big value");
rb_raise(rb_eArgError, "uv_to_utf8(); value out of range");
}

static const long utf8_limits[] = {
Expand Down
9 changes: 8 additions & 1 deletion time.c
Original file line number Diff line number Diff line change
Expand Up @@ -1317,6 +1317,7 @@ time_mdump(time)
char buf[8];
time_t t;
int i;
VALUE str;

GetTimeval(time, tobj);

Expand Down Expand Up @@ -1344,7 +1345,13 @@ time_mdump(time)
s = RSHIFT(s, 8);
}

return rb_str_new(buf, 8);
str = rb_str_new(buf, 8);
if (FL_TEST(time, FL_EXIVAR)) {
rb_copy_generic_ivar(str, time);
FL_SET(str, FL_EXIVAR);
}

return str;
}

static VALUE
Expand Down

0 comments on commit 0b2e94b

Please sign in to comment.