@@ -1941,9 +1941,9 @@ protected RubyString scrubAsciiCompat(Object string, RubyProc block,
1941
1941
}
1942
1942
}
1943
1943
}
1944
- RubyString repl = ( RubyString ) yieldNode
1944
+ Object repl = yieldNode
1945
1945
.yield (block , makeStringNode .fromRope (substringNode .executeSubstring (rope , p , clen )));
1946
- buf = concatNode .executeConcat (buf , repl . rope , enc );
1946
+ buf = concatNode .executeConcat (buf , strings . getRope ( repl ) , enc );
1947
1947
p += clen ;
1948
1948
p1 = p ;
1949
1949
p = StringSupport .searchNonAscii (pBytes , p , e );
@@ -1957,9 +1957,9 @@ protected RubyString scrubAsciiCompat(Object string, RubyProc block,
1957
1957
buf = concatNode .executeConcat (buf , substringNode .executeSubstring (rope , p1 , p - p1 ), enc );
1958
1958
}
1959
1959
if (p < e ) {
1960
- RubyString repl = ( RubyString ) yieldNode
1960
+ Object repl = yieldNode
1961
1961
.yield (block , makeStringNode .fromRope (substringNode .executeSubstring (rope , p , e - p )));
1962
- buf = concatNode .executeConcat (buf , repl . rope , enc );
1962
+ buf = concatNode .executeConcat (buf , strings . getRope ( repl ) , enc );
1963
1963
}
1964
1964
1965
1965
return makeStringNode .fromRope (buf );
0 commit comments