1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* string.c (rb_str_reverse_bang): forgot to call rb_str_modify().

* object.c (rb_obj_taint): check frozen status before modifying
  taint status.

* object.c (rb_obj_untaint): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2001-01-09 16:55:50 +00:00
parent 254004fd9e
commit a404ead89e
3 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,14 @@
Wed Jan 10 01:50:45 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
* string.c (rb_str_reverse_bang): forgot to call rb_str_modify().
Tue Jan 9 17:41:40 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
* object.c (rb_obj_taint): check frozen status before modifying
taint status.
* object.c (rb_obj_untaint): ditto.
Tue Jan 9 16:22:14 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
* enum.c (enum_inject): new method.

View file

@ -286,6 +286,9 @@ rb_obj_taint(obj)
VALUE obj;
{
rb_secure(4);
if (OBJ_FROZEN(obj)) {
rb_error_frozen("object");
}
OBJ_TAINT(obj);
return obj;
}
@ -295,6 +298,9 @@ rb_obj_untaint(obj)
VALUE obj;
{
rb_secure(3);
if (OBJ_FROZEN(obj)) {
rb_error_frozen("object");
}
FL_UNSET(obj, FL_TAINT);
return obj;
}

View file

@ -1399,6 +1399,7 @@ rb_str_reverse_bang(str)
char *s, *e;
char c;
rb_str_modify(str);
s = RSTRING(str)->ptr;
e = s + RSTRING(str)->len - 1;
while (s < e) {