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

Suppress unused literal warnings in verbose mode

This commit is contained in:
Nobuyoshi Nakada 2019-06-30 09:52:31 +09:00
parent 3620568d3a
commit 4a063546e7
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -10,13 +10,15 @@ class TestTracepointObj < Test::Unit::TestCase
end
def test_tracks_objspace_events
result = Bug.tracepoint_track_objspace_events{
result = EnvUtil.suppress_warning {eval(<<-EOS, nil, __FILE__, __LINE__+1)}
Bug.tracepoint_track_objspace_events {
99
'abc'
_="foobar"
Object.new
nil
}
EOS
newobj_count, free_count, gc_start_count, gc_end_mark_count, gc_end_sweep_count, *newobjs = *result
assert_equal 2, newobj_count