Skip to content

Commit 806fc01

Browse files
authored
Merge pull request #5928 from ahorek/unpack1
faster unpack1
2 parents 4419bf1 + 6bcea54 commit 806fc01

File tree

4 files changed

+112
-63
lines changed

4 files changed

+112
-63
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6026,6 +6026,11 @@ public RubyArray unpack(ThreadContext context, IRubyObject obj, Block block) {
60266026
return Pack.unpackWithBlock(context, this, stringValue(obj).value, block);
60276027
}
60286028

6029+
@JRubyMethod
6030+
public IRubyObject unpack1(ThreadContext context, IRubyObject obj, Block block) {
6031+
return Pack.unpack1WithBlock(context, this, stringValue(obj).value, block);
6032+
}
6033+
60296034
@Deprecated // not used
60306035
public RubyArray unpack(IRubyObject obj) {
60316036
return Pack.unpack(getRuntime(), this.value, stringValue(obj).value);

0 commit comments

Comments
 (0)