public static object RemoveCharInPlace(RubyContext/*!*/ context, MutableString/*!*/ self, [DefaultProtocol]int index) { if (!InExclusiveRangeNormalized(self, ref index)) { return null; } // TODO: optimize if the value is not read: int result = self.PeekByte(index); self.Remove(index, 1); return result; }