reduce RSTRING_PTR usage
exc_inspect: dup file and check mesg only once
Merge pull request #2059 from cremno/reduce-rstring_ptr-usage

reduce RSTRING_PTR usage
Merge pull request #2060 from cremno/exc_inspect-dup-file

exc_inspect: dup file and check mesg only once