From e7c0a6e1d745935460a226cd5f29e2f0faff5417 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 20 Feb 2011 07:23:55 +0000 Subject: * prevent temporary objects from GC, and should not use RSTRING_PTR() for function calls since it evaluates the argument a couple of times. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_insnhelper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vm_insnhelper.c') diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 139a2a24ab..3666aed53e 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1143,7 +1143,7 @@ vm_check_if_namespace(VALUE klass) default: str = rb_inspect(klass); rb_raise(rb_eTypeError, "%s is not a class/module", - RSTRING_PTR(RB_GC_GUARD(str))); + StringValuePtr(str)); } } -- cgit v1.2.3