ruby-changes:18432
From: ryan <ko1@a...>
Date: Wed, 5 Jan 2011 14:18:53 +0900 (JST)
Subject: [ruby-changes:18432] Ruby:r30455 (trunk): Error#to_s should ensure that the value returned is a string.
ryan 2011-01-05 14:18:48 +0900 (Wed, 05 Jan 2011) New Revision: 30455 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30455 Log: Error#to_s should ensure that the value returned is a string. Modified files: trunk/error.c Index: error.c =================================================================== --- error.c (revision 30454) +++ error.c (revision 30455) @@ -524,8 +524,7 @@ VALUE mesg = rb_attr_get(exc, rb_intern("mesg")); if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc)); - OBJ_INFECT(mesg, exc); - return mesg; + return rb_String(mesg); } /* -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/