ruby-changes:17451
From: naruse <ko1@a...>
Date: Tue, 12 Oct 2010 21:39:28 +0900 (JST)
Subject: [ruby-changes:17451] Ruby:r29456 (trunk): * error.c (exc_to_s): use OBJ_INFECT.
naruse 2010-10-12 21:39:22 +0900 (Tue, 12 Oct 2010) New Revision: 29456 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29456 Log: * error.c (exc_to_s): use OBJ_INFECT. * error.c (name_err_to_s): ditto. * error.c (name_err_mesg_to_str): ditto. * error.c (syserr_initialize): ditto. Modified files: trunk/ChangeLog trunk/error.c Index: ChangeLog =================================================================== --- ChangeLog (revision 29455) +++ ChangeLog (revision 29456) @@ -1,3 +1,13 @@ +Tue Oct 12 19:25:13 2010 NARUSE, Yui <naruse@r...> + + * error.c (exc_to_s): use OBJ_INFECT. + + * error.c (name_err_to_s): ditto. + + * error.c (name_err_mesg_to_str): ditto. + + * error.c (syserr_initialize): ditto. + Tue Oct 12 19:07:55 2010 NARUSE, Yui <naruse@r...> * error.c (syserr_initialize): taint message if mesg is given Index: error.c =================================================================== --- error.c (revision 29455) +++ error.c (revision 29456) @@ -501,7 +501,7 @@ VALUE mesg = rb_attr_get(exc, rb_intern("mesg")); if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc)); - if (OBJ_TAINTED(exc)) OBJ_TAINT(mesg); + OBJ_INFECT(mesg, exc); return mesg; } @@ -782,7 +782,7 @@ if (str != mesg) { rb_iv_set(exc, "mesg", mesg = str); } - if (OBJ_TAINTED(exc)) OBJ_TAINT(mesg); + OBJ_INFECT(mesg, exc); return mesg; } @@ -911,7 +911,7 @@ args[2] = d; mesg = rb_f_sprintf(NAME_ERR_MESG_COUNT, args); } - if (OBJ_TAINTED(obj)) OBJ_TAINT(mesg); + OBJ_INFECT(mesg, obj); return mesg; } @@ -1059,7 +1059,7 @@ if (le != me && rb_enc_asciicompat(me)) le = me; }/* else assume err is non ASCII string. */ - if (OBJ_TAINTED(str)) OBJ_TAINT(mesg); + OBJ_INFECT(mesg, str); rb_enc_associate(mesg, le); } else { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/