We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d6f97ec commit 124cb7fCopy full SHA for 124cb7f
ext/jruby/org/jruby/ext/strscan/RubyStringScanner.java
@@ -770,7 +770,7 @@ public IRubyObject rest(ThreadContext context) {
770
int realSize = value.getRealSize();
771
772
if (curr >= realSize) {
773
- return RubyString.newEmptyString(runtime);
+ return RubyString.newEmptyString(runtime, str.getEncoding());
774
}
775
776
return extractRange(runtime, curr, realSize);
0 commit comments