1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Make TracePoint.stat a singleton method again (#2726)

[Bug #16399]
This commit is contained in:
Alan Wu 2019-12-04 21:02:21 -05:00 committed by GitHub
parent e4db0443bc
commit df76f2c577
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2019-12-05 11:02:54 +09:00
Merged-By: XrXr
3 changed files with 6 additions and 2 deletions

View file

@ -2266,4 +2266,8 @@ class TestSetTraceFunc < Test::Unit::TestCase
bar
EOS
end
def test_stat_exists
assert_instance_of Hash, TracePoint.stat
end
end

View file

@ -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])

View file

@ -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