Closed mame closed 7 years ago
Looking at expand_trans_str
, would changing the for
loop to:
if i < len(source):
char = source[i]
# Moved the assertion to this conditional:
if char == "-" and 0 < i < len(source) - 1:
# expand the range
range_beg = ord(source[i - 1])
range_end = ord(source[i + 1])
for j in range(range_beg + 1, range_end - 1):
expanded_source.append(chr(j))
elif char:
expanded_source.append(char[0])
fix this?
Hello,
String#tr
fails with AssertionError when the second argument is"="
.MRI works like:
Thank you,