summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2024-02-20 13:42:29 -0800
committerGitHub <noreply@github.com>2024-02-20 13:42:29 -0800
commit9216a2ac43a6e8a22efad582c4460c51cab72674 (patch)
treee23399ee09dcd72fd1b611ec78afd391d4a05c61 /bootstraptest
parentd4b4b53bc02c7bc12f3cba75c8390a8ab27e9306 (diff)
YJIT: Verify the assumption of leaf C calls (#10002)
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 8acc9bddcd..2225423aa1 100644
--- a/bootstraptest/test_yjit.rb
+++ b/bootstraptest/test_yjit.rb
@@ -2046,6 +2046,16 @@ assert_equal '[97, :nil, 97, :nil, :raised]', %q{
[getbyte("a", 0), getbyte("a", 1), getbyte("a", -1), getbyte("a", -2), getbyte("a", "a")]
} unless rjit_enabled? # Not yet working on RJIT
+# non-leaf String#byteslice
+assert_equal 'TypeError', %q{
+ def ccall = "".byteslice(nil, nil)
+ begin
+ ccall
+ rescue => e
+ e.class
+ end
+}
+
# Test << operator on string subclass
assert_equal 'abab', %q{
class MyString < String; end