Skip to content

Commit

Permalink
Showing 2 changed files with 0 additions and 26 deletions.
11 changes: 0 additions & 11 deletions core/src/main/java/org/jruby/specialized/RubyArrayOneObject.java
Original file line number Diff line number Diff line change
@@ -83,17 +83,6 @@ public IRubyObject rb_clear() {
return this;
}

@Override
public IRubyObject collect(ThreadContext context, Block block) {
if (!packed()) return super.collect(context, block);

IRubyObject elt0 = block.yield(context, value);

if (!packed()) return collectFrom(context, arrayOf(elt0), 1, block);

return new RubyArrayOneObject(getRuntime(), elt0);
}

@Override
public void copyInto(IRubyObject[] target, int start) {
if (!packed()) {
15 changes: 0 additions & 15 deletions core/src/main/java/org/jruby/specialized/RubyArrayTwoObject.java
Original file line number Diff line number Diff line change
@@ -92,21 +92,6 @@ public IRubyObject rb_clear() {
return this;
}

@Override
public IRubyObject collect(ThreadContext context, Block block) {
if (!packed()) return super.collect(context, block);

IRubyObject elt0 = block.yield(context, car);

if (!packed()) return collectFrom(context, arrayOf(elt0), 1, block);

IRubyObject elt1 = block.yield(context, cdr);

if (!packed()) return collectFrom(context, arrayOf(elt0, elt1), 2, block);

return new RubyArrayTwoObject(getRuntime(), block.yield(context, car), block.yield(context, cdr));
}

@Override
public void copyInto(IRubyObject[] target, int start) {
if (!packed()) {

0 comments on commit fd44e62

Please sign in to comment.