summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-30 09:52:31 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-30 11:49:40 +0900
commit4a063546e7de9ddb424fdf822e69bb3ffeb50631 (patch)
tree05e8d2cc8885bb8a7ea3daeecae72504a6d7cb81 /test
parent3620568d3ac0533b050985d7c3c4ca871d464fd6 (diff)
Suppress unused literal warnings in verbose mode
Diffstat (limited to 'test')
-rw-r--r--test/-ext-/tracepoint/test_tracepoint.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/-ext-/tracepoint/test_tracepoint.rb b/test/-ext-/tracepoint/test_tracepoint.rb
index d8aa1e4..e0fafdc 100644
--- a/test/-ext-/tracepoint/test_tracepoint.rb
+++ b/test/-ext-/tracepoint/test_tracepoint.rb
@@ -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