From 8fa1fff85657ce3cf0782bd1bbd6fe64c9dbec1c Mon Sep 17 00:00:00 2001 From: Spring_MT Date: Sun, 9 Aug 2026 22:26:16 +0900 Subject: [PATCH] Revert "Add Valgrind memcheck (ruby_memcheck) for the C extension" --- Gemfile | 2 -- Rakefile | 28 ---------------------------- 2 files changed, 30 deletions(-) diff --git a/Gemfile b/Gemfile index 2c76704..afffcc2 100644 --- a/Gemfile +++ b/Gemfile @@ -2,5 +2,3 @@ source 'https://rubygems.org' # Specify your gem's dependencies in zstd_ruby.gemspec gemspec - -gem 'ruby_memcheck', '~> 3.0' if RUBY_PLATFORM.include?('linux') diff --git a/Rakefile b/Rakefile index a2eb7e5..f76e1c2 100644 --- a/Rakefile +++ b/Rakefile @@ -15,34 +15,6 @@ end task :default => [:clobber, :compile, :spec] -if RUBY_PLATFORM.include?('linux') - begin - require 'ruby_memcheck' - require 'ruby_memcheck/rspec/rake_task' - - RubyMemcheck.config( - binary_name: 'zstdruby', - # Valgrind and YJIT interfere with each other, adding noise and slowdown, - # so keep YJIT disabled while running under Valgrind. - ruby: "#{FileUtils::RUBY} --disable-yjit" - ) - - namespace :spec do - task :check_valgrind do - unless system('command -v valgrind > /dev/null 2>&1') - abort("\nValgrind is required for `rake spec:valgrind` but was not found.\n" \ - "Install it first (Linux only), e.g. `sudo apt-get install valgrind`.\n") - end - end - - RubyMemcheck::RSpec::RakeTask.new(valgrind: [:check_valgrind, :compile]) - end - rescue LoadError - # ruby_memcheck is an optional, Linux-only development dependency. If it is - # not installed just skip defining the task instead of breaking the Rakefile. - end -end - desc 'Sync zstd libs dirs to ext/zstdruby/libzstd' task :zstd_update do FileUtils.rm_r("ext/zstdruby/libzstd")