summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-28 23:18:15 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-28 23:18:15 +0000
commit1c0add85ca100eb93a3455aa51a4ffe13bb72e35 (patch)
treebaf5ea99fc61d9bd1bbe556c29e91514c8965c7a /vm_eval.c
parentf0a2b08d02e9e439e8d700f49e6a348b2d3ee9e0 (diff)
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
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm_eval.c b/vm_eval.c
index 0afbd285d9..521a2a5439 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -1014,7 +1014,8 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, NODE *cref, const char
th->base_block = 0;
if (0) { /* for debug */
- printf("%s\n", RSTRING_PTR(rb_iseq_disasm(iseqval)));
+ VALUE disasm = rb_iseq_disasm(iseqval);
+ printf("%s\n", StringValuePtr(disasm));
}
/* save new env */