Skip to content

Commit

Permalink
Drop singleton class when flattening.
Browse files Browse the repository at this point in the history
headius committed Oct 18, 2017
1 parent ee9d51c commit a708b16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyArray.java
Original file line number Diff line number Diff line change
@@ -3110,7 +3110,7 @@ public IRubyObject flatten_bang19(ThreadContext context, IRubyObject arg) {
public IRubyObject flatten(ThreadContext context) {
Ruby runtime = context.runtime;

RubyArray result = new RubyArray(runtime, getMetaClass(), realLength);
RubyArray result = new RubyArray(runtime, getMetaClass().getRealClass(), realLength);
flatten(context, -1, result);
result.infectBy(this);
return result;

0 comments on commit a708b16

Please sign in to comment.