Skip to content

Commit

Permalink
Fix one byte opt for 1.9 trtrans.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.codehaus.org/jruby/trunk/jruby@9317 961051c9-f516-0410-bf72-c9f7e237a7b7
  • Loading branch information
lopex committed Feb 25, 2009
1 parent 0bc2921 commit 9fb9db3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/org/jruby/RubyString.java
Expand Up @@ -6171,7 +6171,7 @@ private IRubyObject trTrans19(ThreadContext context, IRubyObject src, IRubyObjec
buf = tbuf;
}
enc.codeToMbc(c, buf, t);
if (mayModify && tlen == 1 ? sbytes[s] != buf[t] : ByteList.memcmp(sbytes, s, buf, t, tlen) != 0) modify = true;
if (mayModify && (tlen == 1 ? sbytes[s] != buf[t] : ByteList.memcmp(sbytes, s, buf, t, tlen) != 0)) modify = true;
if (cr == CR_7BIT && !Encoding.isAscii(c)) cr = CR_VALID;
t += tlen;
}
Expand Down Expand Up @@ -6221,7 +6221,7 @@ private IRubyObject trTrans19(ThreadContext context, IRubyObject src, IRubyObjec

enc.codeToMbc(c, buf, t);

if (mayModify && tlen == 1 ? sbytes[s] != buf[t] : ByteList.memcmp(sbytes, s, buf, t, tlen) != 0) modify = true;
if (mayModify && (tlen == 1 ? sbytes[s] != buf[t] : ByteList.memcmp(sbytes, s, buf, t, tlen) != 0)) modify = true;
if (cr == CR_7BIT && !Encoding.isAscii(c)) cr = CR_VALID;
s += clen;
t += tlen;
Expand Down

0 comments on commit 9fb9db3

Please sign in to comment.