summaryrefslogtreecommitdiff
path: root/ext/-test-/cxxanyargs/extconf.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-09-19 20:07:24 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-09-19 20:57:58 +0900
commita3daf8e49a36dc5501b020a882d611676a6ad264 (patch)
treefbe3cf14a20c06cdea881c291a0388a6f613f013 /ext/-test-/cxxanyargs/extconf.rb
parentb3ddeac33e299f36084339aceaaa0a29cf8b7498 (diff)
Ensure that unmatched arity fails in C++
Diffstat (limited to 'ext/-test-/cxxanyargs/extconf.rb')
-rw-r--r--ext/-test-/cxxanyargs/extconf.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/ext/-test-/cxxanyargs/extconf.rb b/ext/-test-/cxxanyargs/extconf.rb
index 7e2449a457..90ab85608a 100644
--- a/ext/-test-/cxxanyargs/extconf.rb
+++ b/ext/-test-/cxxanyargs/extconf.rb
@@ -22,5 +22,18 @@ begin
end
if ok
- create_makefile("-test-/cxxanyargs")
+ $srcs = %w[cxxanyargs.cpp]
+ $cleanfiles << "failure.failed"
+ create_makefile("-test-/cxxanyargs") do |mk|
+ mk << <<MK
+
+cxxanyargs.#$OBJEXT: failure.failed
+
+failure.failed: failure.cpp
+\t$(Q)$(RUBY) -rfileutils \\
+\t -e "err = IO.popen(%[$(MAKE) failure.#$OBJEXT], err:[:child, :out], &:read)" \\
+\t -e "abort err unless /rb_define_method/ =~ err" \\
+\t -e "FileUtils.touch(*ARGV)" $@
+MK
+ end
end