File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
src/main/java/org/truffleruby/language/supercall Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2013, 2019 Oracle and/or its affiliates. All rights reserved. This
2
+ * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. This
3
3
* code is released under a tri EPL/GPL/LGPL license. You can use it,
4
4
* redistribute it and/or modify it under the terms of the:
5
5
*
@@ -48,7 +48,15 @@ public final Object execute(VirtualFrame frame) {
48
48
49
49
if (restArgIndex != -1 ) {
50
50
final Object restArg = superArguments [restArgIndex ];
51
- final Object [] restArgs = unsplat ((RubyArray ) restArg );
51
+
52
+ final Object [] restArgs ;
53
+
54
+ if (restArg instanceof RubyArray ) {
55
+ restArgs = unsplat ((RubyArray ) restArg );
56
+ } else {
57
+ restArgs = new Object []{restArg };
58
+ }
59
+
52
60
final int after = superArguments .length - (restArgIndex + 1 );
53
61
Object [] splattedArguments = ArrayUtils .copyOf (superArguments , superArguments .length + restArgs .length - 1 );
54
62
ArrayUtils .arraycopy (
You can’t perform that action at this time.
0 commit comments