ruby-changes:56295
From: Nobuyoshi <ko1@a...>
Date: Sun, 30 Jun 2019 21:39:14 +0900 (JST)
Subject: [ruby-changes:56295] Nobuyoshi Nakada: 8640153e59 (trunk): Added test for require-return hook
https://git.ruby-lang.org/ruby.git/commit/?id=8640153e59 From 8640153e59a106ab2331effc33dcf03415a7e89c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 30 Jun 2019 21:21:06 +0900 Subject: Added test for require-return hook diff --git a/test/dtrace/test_require.rb b/test/dtrace/test_require.rb index 9fa6c0e..da5c08f 100644 --- a/test/dtrace/test_require.rb +++ b/test/dtrace/test_require.rb @@ -25,6 +25,12 @@ ruby$target:::require-return https://github.com/ruby/ruby/blob/trunk/test/dtrace/test_require.rb#L25 printf("%s\\n", copyinstr(arg0)); } eoprobe + trap_probe(probe, ruby_program) { |d_file, rb_file, saw| + required = saw.map { |s| s.split }.find_all do |(required, _)| + required == 'dtrace/dummy' + end + assert_equal 10, required.length + } end private -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/