summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorNikita Vasilevsky <nikita.vasilevsky@shopify.com>2021-10-29 12:31:31 -0400
committerKoichi Sasada <ko1@atdot.net>2021-11-09 16:56:44 +0900
commitc1c13c58eebb7441d27536a32d73380d165d6eda (patch)
tree2692df5e61fb60d83f969737840deef0507c0a0a /bootstraptest
parent5a3b2e61411f3ce516eefeb272787d3d2af13038 (diff)
Add one more test example for swap instruction
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5057
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_insns.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/bootstraptest/test_insns.rb b/bootstraptest/test_insns.rb
index 31fdc29d02..91fba9b011 100644
--- a/bootstraptest/test_insns.rb
+++ b/bootstraptest/test_insns.rb
@@ -120,6 +120,7 @@ tests = [
[ 'dup', %q{ x = y = true; x }, ],
[ 'dupn', %q{ Object::X ||= true }, ],
[ 'reverse', %q{ q, (w, e), r = 1, [2, 3], 4; e == 3 }, ],
+ [ 'swap', %q{ !!defined?([[]]) }, ],
[ 'swap', <<-'},', ], # {
x = [[false, true]]
for i, j in x # here