From 763fb0e77062cd8f56439f1d192e00900d47aded Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Tue, 23 May 2023 13:01:06 +0200 Subject: Fix profiler deprecations ``` NOTE: RubyProf.profile is deprecated; use Profile.profile instead. It will be removed on or after 2023-06. RubyProf.profile called from ./test/profile.rb:14. NOTE: RubyProf.running? is deprecated; use Profile#running? instead. It will be removed on or after 2023-06. NOTE: RubyProf.measure_mode is deprecated; use Profile#measure_mode instead. It will be removed on or after 2023-06. NOTE: RubyProf.exclude_threads is deprecated; use Profile#exclude_threads instead. It will be removed on or after 2023-06. ``` --- test/profile.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/profile.rb b/test/profile.rb index adbc7ab9..a0f34f8d 100755 --- a/test/profile.rb +++ b/test/profile.rb @@ -11,7 +11,7 @@ input2 = (65..122).to_a.pack('U*').chars.to_a # these do not need to be escaped 10.times { row << input1.shuffle.join } 10.times { row << input2.shuffle.join } -profile = RubyProf.profile do +result = RubyProf::Profile.profile do p = Axlsx::Package.new p.workbook.add_worksheet do |sheet| 10_000.times do @@ -21,5 +21,5 @@ profile = RubyProf.profile do p.to_stream end -printer = RubyProf::FlatPrinter.new(profile) +printer = RubyProf::FlatPrinter.new(result) printer.print($stdout, {}) -- cgit v1.2.3