diff options
Diffstat (limited to 'test/dtrace/test_array_create.rb')
| -rw-r--r-- | test/dtrace/test_array_create.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/dtrace/test_array_create.rb b/test/dtrace/test_array_create.rb index affcd475c0..1bf20085ba 100644 --- a/test/dtrace/test_array_create.rb +++ b/test/dtrace/test_array_create.rb @@ -1,4 +1,5 @@ -require 'dtrace/helper' +# frozen_string_literal: false +require_relative 'helper' module DTrace class TestArrayCreate < TestCase @@ -13,11 +14,11 @@ module DTrace end def test_many_lit - trap_probe(probe, '[1,2,3,4]') { |_,rbfile,saw| - saw = saw.map(&:split).find_all { |num, file, line| + trap_probe(probe, '[1,2,3,4]') { |_,rbfile,orig| + saw = orig.map(&:split).find_all { |num, file, line| file == rbfile && num == '4' && line == '1' } - assert_operator saw.length, :>, 0 + assert_operator saw.length, :>, 0, orig } end @@ -25,7 +26,7 @@ module DTrace def probe type = 'array' <<-eoprobe ruby$target:::#{type}-create -/arg1/ +/arg1 && arg2/ { printf("%d %s %d\\n", arg0, copyinstr(arg1), arg2); } |
