From eb807d42eca121df22f72b95465bba52a4e7fefa Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 7 Mar 2011 08:39:39 +0000 Subject: * gc.c (rb_gc_set_params): allow GC parameter configuration by environment variables. based on a patch from funny-falcon at https://gist.github.com/856296, but honors safe level. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'string.c') diff --git a/string.c b/string.c index 798e108d42..0fb667f0c5 100644 --- a/string.c +++ b/string.c @@ -5164,7 +5164,7 @@ tr_trans(VALUE str, VALUE src, VALUE repl, int sflag) else c = NUM2INT(tmp); } else { - c = cflag ? last : errc; + c = errc; } if (c != errc) { tlen = rb_enc_codelen(c, enc); -- cgit v1.2.3