From: Ryan Davis Date: 2011-01-04T09:52:36+09:00 Subject: [ruby-core:34041] Re: Exception#to_s and non-String Messages How's this? On Jan 3, 2011, at 14:44 , Run Paint Run Run wrote: >>> Exception.new(Object.new).message % make ruby19 && ./ruby19 -e 'p Exception.new(:blah).to_s' compiling error.c linking miniruby rbconfig.rb unchanged generating prelude.c compiling prelude.c linking static-library libruby-static.a linking ruby19 "blah" 2989 % svn diff Index: error.c =================================================================== --- error.c (revision 30439) +++ error.c (working copy) @@ -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); } /* 2990 %