mruby/mruby — pull request #468 by tsahara-iij (2012-09-12 11:27:07+00:00)
Title: check if an Exception instance has a "mesg" attribute

fix the issue that "Exception.new.inspect" causes SIGSEGV.

Applying the patch, "Exception#inspect" returns the name of the class if an instance was initialized with no "message" argument. This behavior is compatible with CRuby.

```
% bin/mruby -e 'p Exception.new.inspect'
"Exception: Exception"
% bin/mruby -e 'p Exception.new("a").inspect'
"Exception: a"
% bin/mruby -e 'p RuntimeError.new.inspect'
"RuntimeError: RuntimeError"

% ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-openbsd]
% ruby -e 'p Exception.new.inspect'
"#"
```