From 31e838457b57e87bc238a9c3c65e988dcc872e21 Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Wed, 11 Oct 2023 02:28:47 +0000 Subject: [PATCH] Change to latest rubyspec reference --- spec/integrations.yml | 28 +++------------------------- spec/support/corpus.rb | 7 ++++++- 2 files changed, 9 insertions(+), 26 deletions(-) diff --git a/spec/integrations.yml b/spec/integrations.yml index fe0119318..a9e58a8f1 100644 --- a/spec/integrations.yml +++ b/spec/integrations.yml @@ -2,35 +2,13 @@ - name: rubyspec namespace: Rubyspec repo_uri: 'https://github.com/ruby/rubyspec.git' - repo_ref: 249a36c2e9fcddbb208a0d618d05f6bd9a64fd17 + repo_ref: 59bdcb4ea95c60159bb2bfc8c73022364da8ec0d integration_name: mspec mutation_coverage: false mutation_generation: true exclude: - - command_line/fixtures/bad_syntax.rb - - command_line/fixtures/freeze_flag_required_diff_enc.rb - - core/file/stat_spec.rb - - core/kernel/shared/sprintf_encoding.rb - - core/module/fixtures/autoload_empty.rb - - core/module/fixtures/autoload_never_set.rb - - core/module/fixtures/path2/load_path.rb - - core/regexp/shared/new.rb - - core/string/casecmp_spec.rb - - core/string/encode_spec.rb - - core/string/inspect_spec.rb - - core/string/shared/to_sym.rb - - core/symbol/casecmp_spec.rb - - language/fixtures/freeze_magic_comment_required_diff_enc.rb - - language/fixtures/utf16-be-nobom.rb - - language/fixtures/utf16-le-nobom.rb - - language/predefined/fixtures/data4.rb - - language/predefined/fixtures/data_only.rb - - language/source_encoding_spec.rb - - library/base64/decode64_spec.rb - - library/cgi/escapeHTML_spec.rb - # invalid regexp on 3.1 parser - - regexp_parser/test/parser/test_escapes.rb - - security/cve_2010_1330_spec.rb + # regexp_parser crash + - language/regexp/back-references_spec.rb - name: regexp_parser namespace: Regexp repo_uri: 'https://github.com/ammar/regexp_parser.git' diff --git a/spec/support/corpus.rb b/spec/support/corpus.rb index a10cb954c..6c88dd3b9 100644 --- a/spec/support/corpus.rb +++ b/spec/support/corpus.rb @@ -135,7 +135,12 @@ def checkout # # @return [Integer] mutations generated def check_generation(path) - node = Unparser.parse(path.read) or return 0 + begin + node = Unparser.parse(path.read) or return 0 + # no need to generate mutation if the source is invalid + rescue Parser::SyntaxError + return 0 + end mutations = Mutant::Mutator::Node.mutate( config: Mutant::Mutation::Config::DEFAULT.with(operators: Mutant::Mutation::Operators::Full.new),