summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2021-09-17 08:38:14 -0700
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:41 -0400
commit2ff26b9ec28c9a4e0ae7a4a009da99fd200cc5e0 (patch)
treeb9525ffdda4eb0ef3524d32cc4a7e97c7a30dc7e /bootstraptest
parenta6cf515e6acdc4c308e8fe8f284fd381b0a0285c (diff)
Fix opt_aset comptime_key check
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_yjit.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb
index 1ff6b13f5c..8cb4432b6a 100644
--- a/bootstraptest/test_yjit.rb
+++ b/bootstraptest/test_yjit.rb
@@ -1996,3 +1996,13 @@ assert_equal 'true', %q{
eq(1, 2)
eq(1, 2)
}
+
+# aset on array with invalid key
+assert_normal_exit %q{
+ def foo(arr)
+ arr[:foo] = 123
+ end
+
+ foo([1]) rescue nil
+ foo([1]) rescue nil
+}