aboutsummaryrefslogtreecommitdiffstats
path: root/insns.def
diff options
context:
space:
mode:
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def4
1 files changed, 3 insertions, 1 deletions
diff --git a/insns.def b/insns.def
index 1ad6490f15..02ffe11673 100644
--- a/insns.def
+++ b/insns.def
@@ -1328,7 +1328,9 @@ invokeblock
if (BUILTIN_TYPE(iseq) != T_NODE) {
if (flag & VM_CALL_ARGS_SPLAT_BIT) {
VALUE ary = TOPN(0);
- if (CLASS_OF(ary) != rb_cArray) {
+ ary = rb_check_convert_type(ary, T_ARRAY, "Array", "to_splat");
+
+ if (NIL_P(ary)) {
/* not a [BUG] */
}
else {