Skip to content

Commit

Permalink
faster unpack1
Browse files Browse the repository at this point in the history
  • Loading branch information
ahorek committed Oct 20, 2019
1 parent ebab3d4 commit 6bcea54
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 63 deletions.
5 changes: 5 additions & 0 deletions core/src/main/java/org/jruby/RubyString.java
Original file line number Diff line number Diff line change
Expand Up @@ -6026,6 +6026,11 @@ public RubyArray unpack(ThreadContext context, IRubyObject obj, Block block) {
return Pack.unpackWithBlock(context, this, stringValue(obj).value, block);
}

@JRubyMethod
public IRubyObject unpack1(ThreadContext context, IRubyObject obj, Block block) {
return Pack.unpack1WithBlock(context, this, stringValue(obj).value, block);
}

@Deprecated // not used
public RubyArray unpack(IRubyObject obj) {
return Pack.unpack(getRuntime(), this.value, stringValue(obj).value);
Expand Down
Loading

0 comments on commit 6bcea54

Please sign in to comment.