ruby-changes:56292
From: Nobuyoshi <ko1@a...>
Date: Sun, 30 Jun 2019 19:23:53 +0900 (JST)
Subject: [ruby-changes:56292] Nobuyoshi Nakada: 4a063546e7 (trunk): Suppress unused literal warnings in verbose mode
https://git.ruby-lang.org/ruby.git/commit/?id=4a063546e7 From 4a063546e7de9ddb424fdf822e69bb3ffeb50631 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 30 Jun 2019 09:52:31 +0900 Subject: Suppress unused literal warnings in verbose mode 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 https://github.com/ruby/ruby/blob/trunk/test/-ext-/tracepoint/test_tracepoint.rb#L10 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/