summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2019-12-04 21:02:21 -0500
committerGitHub <noreply@github.com>2019-12-04 21:02:21 -0500
commitdf76f2c577b6567b617be2df9451123cc450d1cc (patch)
tree949c39c14bcd629cd76545857b501a5635801db6
parente4db0443bcfc94f9183e8ea72fb4ab560aa005bf (diff)
Make TracePoint.stat a singleton method again (#2726)
[Bug #16399]
Notes
Notes: Merged-By: XrXr
-rw-r--r--test/ruby/test_settracefunc.rb4
-rw-r--r--tool/test/testunit/test_parallel.rb2
-rw-r--r--trace_point.rb2
3 files changed, 6 insertions, 2 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index dba940b43e..316e14e1ef 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -2266,4 +2266,8 @@ class TestSetTraceFunc < Test::Unit::TestCase
bar
EOS
end
+
+ def test_stat_exists
+ assert_instance_of Hash, TracePoint.stat
+ end
end
diff --git a/tool/test/testunit/test_parallel.rb b/tool/test/testunit/test_parallel.rb
index 60fc2073dd..d5f7cf4487 100644
--- a/tool/test/testunit/test_parallel.rb
+++ b/tool/test/testunit/test_parallel.rb
@@ -113,7 +113,7 @@ module TestParallel
result = Marshal.load($1.chomp.unpack("m")[0])
assert_equal(5, result[0])
- assert_equal(12, result[1])
+ assert_equal(17, result[1])
assert_kind_of(Array,result[2])
assert_kind_of(Array,result[3])
assert_kind_of(Array,result[4])
diff --git a/trace_point.rb b/trace_point.rb
index 9be90506d3..a8c46a0a0e 100644
--- a/trace_point.rb
+++ b/trace_point.rb
@@ -114,7 +114,7 @@ class TracePoint
# It may be changed in future.
#
# This method is only for debugging TracePoint itself.
- def stat
+ def self.stat
__builtin_tracepoint_stat_s
end