summaryrefslogtreecommitdiff
path: root/test/dtrace/test_singleton_function.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/dtrace/test_singleton_function.rb')
-rw-r--r--test/dtrace/test_singleton_function.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/dtrace/test_singleton_function.rb b/test/dtrace/test_singleton_function.rb
index 4b5d3d7f18..bad1fa0692 100644
--- a/test/dtrace/test_singleton_function.rb
+++ b/test/dtrace/test_singleton_function.rb
@@ -1,4 +1,5 @@
-require 'dtrace/helper'
+# frozen_string_literal: false
+require_relative 'helper'
module DTrace
class TestSingletonFunctionEntry < TestCase
@@ -16,8 +17,8 @@ ruby$target:::method-entry
row.first == 'Foo' && row[1] == 'foo'
}
- assert_equal 10, foo_calls.length
- line = '2'
+ assert_equal 10, foo_calls.length, probes.inspect
+ line = '3'
foo_calls.each { |f| assert_equal line, f[3] }
foo_calls.each { |f| assert_equal rb_file, f[2] }
}
@@ -36,8 +37,8 @@ ruby$target:::method-return
row.first == 'Foo' && row[1] == 'foo'
}
- assert_equal 10, foo_calls.length
- line = '2'
+ assert_equal 10, foo_calls.length, probes.inspect
+ line = '3'
foo_calls.each { |f| assert_equal line, f[3] }
foo_calls.each { |f| assert_equal rb_file, f[2] }
}
@@ -45,6 +46,7 @@ ruby$target:::method-return
def ruby_program
<<-eoruby
+ TracePoint.new{}.__enable(nil, nil, Thread.current)
class Foo
def self.foo; end
end