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:
parent
3620568d3a
commit
4a063546e7
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue