summaryrefslogtreecommitdiff
path: root/bootstraptest/test_yjit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'bootstraptest/test_yjit.rb')
-rw-r--r--bootstraptest/test_yjit.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb
index 8902cd6cde..cab905a2af 100644
--- a/bootstraptest/test_yjit.rb
+++ b/bootstraptest/test_yjit.rb
@@ -3662,3 +3662,18 @@ assert_equal '[1, 2, 3]', %q{
end
send(:bar, 1, 2, 3)
}
+
+# Fix splat block arg bad compilation
+assert_equal "foo", %q{
+ def literal(*args, &block)
+ s = ''.dup
+ literal_append(s, *args, &block)
+ s
+ end
+
+ def literal_append(sql, v)
+ sql << v
+ end
+
+ literal("foo")
+}