From 145c1f42b8c75c16db83be069bf609748f4dc744 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Fri, 26 Oct 2007 00:40:18 +0000 Subject: [PATCH] Fix invalid C git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10048 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/ruby/rubyerrors.swg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/ruby/rubyerrors.swg b/Lib/ruby/rubyerrors.swg index 604ed9826..e2564980f 100644 --- a/Lib/ruby/rubyerrors.swg +++ b/Lib/ruby/rubyerrors.swg @@ -99,6 +99,7 @@ const char* Ruby_Format_TypeError( const char* msg, { char buf[128]; VALUE str; + VALUE asStr; if ( msg && *msg ) { str = rb_str_new2(msg); @@ -115,7 +116,7 @@ const char* Ruby_Format_TypeError( const char* msg, str = rb_str_cat2( str, ", but got " ); str = rb_str_cat2( str, rb_obj_classname(input) ); str = rb_str_cat2( str, " " ); - VALUE asStr = rb_inspect(input); + asStr = rb_inspect(input); if ( RSTRING_LEN(asStr) > 30 ) { str = rb_str_cat( str, StringValuePtr(asStr), 30 );