From c0fe73989d3027f0d7c196d01951ece6d112d98b Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 31 Oct 2001 06:53:22 +0000 Subject: * eval.c (POP_VARS): should not set DVAR_DONT_RECYCLE if _old ruby_vars is already force_recycled. * gc.c (rb_gc): handles mark stack overflow. * gc.c (PUSH_MARK): use static mark stack, no more recursion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'string.c') diff --git a/string.c b/string.c index c57ebb5a5b..3981e54d01 100644 --- a/string.c +++ b/string.c @@ -1101,7 +1101,8 @@ rb_str_aref(str, indx) return rb_str_subpat(str, indx, 0); case T_STRING: - if (rb_str_index(str, indx, 0) != -1) return indx; + if (rb_str_index(str, indx, 0) != -1) + return rb_str_dup(indx); return Qnil; default: -- cgit v1.2.3