From 35bc1df02607792b9534f7f45bf7c80174fb97a4 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: http://svn.ruby-lang.org/repos/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 c57ebb5a5..3981e54d0 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