Skip to content

Commit fc05939

Browse files
committed
Clear code range when modify/expanding string for IO.read(..,buf).
Fixes #2316. Test added to MRI in http://mla.n-z.jp/~w3ml/w3ml.cgi/ruby-changes/msg/36766
1 parent 53ca557 commit fc05939

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/main/java/org/jruby/RubyIO.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3144,6 +3144,7 @@ private IRubyObject readNotAll(ThreadContext context, OpenFile myOpenFile, int l
31443144
}
31453145

31463146
str.setValue(newBuffer);
3147+
str.clearCodeRange();
31473148
str.setTaint(true);
31483149

31493150
return str;

0 commit comments

Comments
 (0)