summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-31 06:53:22 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-31 06:53:22 +0000
commitc0fe73989d3027f0d7c196d01951ece6d112d98b (patch)
tree031753e82307ea804a9846f7fad1907d08bfdb21 /string.c
parent4c9362b74fe837475fe0ab647ba48eee07d69f9f (diff)
* 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
Diffstat (limited to 'string.c')
-rw-r--r--string.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/string.c b/string.c
index c57ebb5..3981e54 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: