Skip to content

Commit

Permalink
Ensure string is modifiable before append_as_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Dec 5, 2024
1 parent c572d09 commit b774c50
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/src/main/java/org/jruby/RubyString.java
Original file line number Diff line number Diff line change
Expand Up @@ -5515,6 +5515,7 @@ private IRubyObject rpartitionMismatch(ThreadContext context) {
@JRubyMethod(rest = true)
public IRubyObject append_as_bytes(ThreadContext context, IRubyObject[] args) {
checkFrozen();
modify();

int length = args.length;
for (int i = 0; i < length; i++) {
Expand Down

0 comments on commit b774c50

Please sign in to comment.