# \[Bug #2208\] Exception#inspect $B$N(B message $BIt$,(B inspect $B$5$l$F$$$J$$(B

**URL:** <https://www.ruby-forum.com/t/bug-2208-exception-inspect-b-n-b-message-bit-b-inspect-b-5-l-f-j-b/177266>\
**Category:** Development\
**Created:** [October 14, 2009, 10:39am UTC](https://www.ruby-forum.com/t/bug-2208-exception-inspect-b-n-b-message-bit-b-inspect-b-5-l-f-j-b/177266 "2009-10-14T10:39:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yui\_NARUSE](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8edcca/32.png) [@Yui\_NARUSE](https://www.ruby-forum.com/u/Yui_NARUSE)\
**Post date:** [October 14, 2009, 10:39am UTC](https://www.ruby-forum.com/t/bug-2208-exception-inspect-b-n-b-message-bit-b-inspect-b-5-l-f-j-b/177266/1 "2009-10-14T10:39:11Z")

</div>

Bug #2208: Exception#inspect e$B$Ne(B message e$BIt$,e(B inspect  
e$B$5$l$F$$$J$$e(B  
[http://redmine.ruby-lang.org/issues/show/2208](http://redmine.ruby-lang.org/issues/show/2208)

e$B5/I\<\<Te(B: Yui NARUSE  
e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal  
e$B%+%F%4%je(B: core  
ruby -v: ruby 1.9.2dev (2009-10-13 trunk 25324) [x86\_64-freebsd7.2]

e$BDL\>oe(B Object#inspect e$B$N7k2L$K$G$F$/$kJ8;zNs$Oe(B inspect  
e$B$5$l$F$$$^$9!#e(B  
e$B$7$+$7!"e(BException#inspect e$B$O$=$N$^$^$K$J$C$F$$$^$9!#e(B

class Foo;def initialize;@a=“\t”;end;end  
Foo.new.inspect #=\> #\<Foo:0x000008012dffd8 @a=“\t”\>

Exception.new(“\t”) #=\> #\<Exception: “\t”\>

e$BC1$J$k$+$1K:$l$J5$$,$9$k$N$G$9$,$I$&$G$7$g$&!#e(B

diff --git a/error.c b/error.c  
index a7342de…3a5580a 100644  
— a/error.c  
+++ b/error.c  
@@ -458,7 +458,7 @@ exc\_exception(int argc, VALUE \*argv, VALUE self)  
static VALUE  
exc\_to\_s(VALUE exc)  
{

- VALUE mesg = rb\_attr\_get(exc, rb\_intern(“mesg”));

- VALUE mesg = rb\_inspect(rb\_attr\_get(exc, rb\_intern(“mesg”)));

---

<div class="post-metadata">

**Author:** ![Yui\_NARUSE](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8edcca/32.png) [@Yui\_NARUSE](https://www.ruby-forum.com/u/Yui_NARUSE)\
**Post date:** [October 17, 2009, 5:08am UTC](https://www.ruby-forum.com/t/bug-2208-exception-inspect-b-n-b-message-bit-b-inspect-b-5-l-f-j-b/177266/2 "2009-10-17T05:08:10Z")

</div>

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:39483] [Bug #2208] Exception#inspect  
e$B$Ne(B message e$BIt$,e(B inspect e$B$5$l$F$$$J$$e(B”  
on Wed, 14 Oct 2009 17:38:56 +0900, Yui NARUSE  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

|e$BDL\>oe(B Object#inspect e$B$N7k2L$K$G$F$/$kJ8;zNs$Oe(B inspect e$B$5$l$F$$$^$9!#e(B  
|e$B$7$+$7!"e(BException#inspect e$B$O$=$N$^$^$K$J$C$F$$$^$9!#e(B

|e$BC1$J$k$+$1K:$l$J5$$,$9$k$N$G$9$,$I$&$G$7$g$&!#e(B

e$BNc30$N%a%C%;!\<%8$O=PNO$5$l$k$?$a$N$b$N$G$9$+$i!“e(Binspecte$B$9$ke(B  
e$BI,MW$O$J$$$H$$$&H=CG$G$7$?!#@Q6KE\*$Ke(Binspecte$B$7$?J}$,NI$$M}M3e(B  
e$B$,$”$j$^$9$+$M!#e(B
