summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2021-10-27 07:55:43 -0700
committerGitHub <noreply@github.com>2021-10-27 10:55:43 -0400
commita6104b392ab347c323c93a51fb3b95c3c2cc9e8f (patch)
treeefdd4e67c454a3f14d7507d036bf801384b752bb /bootstraptest
parent5086c25f6015558877f85c3f1c014780b08fd3ce (diff)
downloadruby-a6104b392ab347c323c93a51fb3b95c3c2cc9e8f.tar.gz
YJIT: Support newhash with values (#5029)
* YJIT: Implement newhash with values * YJIT: Add test of duphash * Fix compilation on macos/clang
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 c94c710c4d..0a3aa81860 100644
--- a/bootstraptest/test_yjit.rb
+++ b/bootstraptest/test_yjit.rb
@@ -2278,3 +2278,13 @@ assert_equal '{:foo=>123}', %q{
foo
foo
}
+
+# newhash
+assert_equal '{:foo=>2}', %q{
+ def foo
+ {foo: 1+1}
+ end
+
+ foo
+ foo
+}