603604605606607608609610611612613
if (length > rest) length = rest; // Yow...this is ugly buf.realSize = length; buf.replace(0, length, internal.getByteList().bytes, (int) pos, length); } if (buf == null) { if (!eof) buf = new ByteList(); length = 0;
7071727374757677787980
case '\'': rep = SINGLE; break; case '\\': rep = ESCAPE; break; } if (rep != null) { newBytes.replace(i, 1, rep); i += rep.length - 1; // We subtract one since for loop already adds one } } // Nothing changed, can return original
102103104105106107108109110111112
newBytes.insert(0, BACKQUOTE); newBytes.append(bytes); int i = 0, j = 0; while ((i = newBytes.indexOf('.', j)) != -1) { newBytes.replace(i, 1, QUOTED_DOT); j = i+3; } newBytes.append(BACKQUOTE); return context.getRuntime().newString(newBytes);
243244245246247248249250251252253
i-= bl.begin; bl = new ByteList(bl); replacementFound = true; } bl.replace(i, 1, TWO_SINGLE); i+=1; } if(replacementFound) { return recv.getRuntime().newStringShared(bl); } else {
10771078107910801081108210831084108510861087
ByteList bytes = ptr.string.getByteList(); if (isEndOfString()) bytes.length(Math.max(ptr.pos, len)); bytes.replace(start, ptr.pos - start, ungetBytes.getByteList()); ptr.pos = start; } @JRubyMethod
156157158159160161162163164165166
if ( ! replacement ) { bytes = new ByteList(bytes); replacement = true; } bytes.replace(i, 1, BYTES_SINGLE_Q_x2); i += 1; } return replacement ? RubyString.newStringShared(self.getRuntime(), bytes) : string; }
246247248249250251252253254255256