From 1c0add85ca100eb93a3455aa51a4ffe13bb72e35 Mon Sep 17 00:00:00 2001 From: yugui Date: Sat, 28 May 2011 23:18:15 +0000 Subject: merges r30922 and r30924 from trunk into ruby_1_9_2. -- * prevent temporary objects from GC, and should not use RSTRING_PTR() for function calls since it evaluates the argument a couple of times. -- * thread.c (exec_recursive): prevent temporary objects from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@31765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compile.c') diff --git a/compile.c b/compile.c index 76dc76a161..1e8c09c929 100644 --- a/compile.c +++ b/compile.c @@ -5173,7 +5173,7 @@ get_exception_sym2type(VALUE sym) if (sym == symNext) return CATCH_TYPE_NEXT; sym_inspect = rb_inspect(sym); rb_raise(rb_eSyntaxError, "invalid exception symbol: %s", - RSTRING_PTR(RB_GC_GUARD(sym_inspect))); + StringValuePtr(sym_inspect)); return 0; } -- cgit v1.2.3