summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2024-02-17 17:16:17 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2024-02-17 17:16:17 +0900
commit3b23b45d484f2fd7fef9dddfa73f854f34d6857b (patch)
tree210c3465e8e9f17d76a210fe74bfd5a9328b9ca5
parentb56b8ec797408865ccc79b67e9860d8382f986dd (diff)
Explicitly assert that redefined backquote method is called
It has been used in some tests indirectly, but there was no direct test for redefinition in the toplevel.
-rw-r--r--bootstraptest/test_literal.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/bootstraptest/test_literal.rb b/bootstraptest/test_literal.rb
index a0d4ee08c6..a30661a796 100644
--- a/bootstraptest/test_literal.rb
+++ b/bootstraptest/test_literal.rb
@@ -70,6 +70,7 @@ if /wasi/ !~ target_platform
assert_equal "foo\n", %q(`echo foo`)
assert_equal "foo\n", %q(s = "foo"; `echo #{s}`)
end
+assert_equal "ECHO FOO", %q(def `(s) s.upcase; end; `echo foo`)
# regexp
assert_equal '', '//.source'