From 51b612289fea3486b994b0d5cb7495c1727e43d6 Mon Sep 17 00:00:00 2001 From: Herwin Date: Mon, 4 Aug 2025 15:53:13 +0200 Subject: [PATCH] Cleanup for Regexp.new and Regexp.compile * Fix copy-paste error for Regexp.compile that said Regexp.new * Move regexp_new_string_binary spec for Regexp.new to correct section --- core/regexp/compile_spec.rb | 2 +- core/regexp/new_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/regexp/compile_spec.rb b/core/regexp/compile_spec.rb index c41399cfbb..887c8d77dc 100644 --- a/core/regexp/compile_spec.rb +++ b/core/regexp/compile_spec.rb @@ -14,6 +14,6 @@ it_behaves_like :regexp_new_regexp, :compile end -describe "Regexp.new given a non-String/Regexp" do +describe "Regexp.compile given a non-String/Regexp" do it_behaves_like :regexp_new_non_string_or_regexp, :compile end diff --git a/core/regexp/new_spec.rb b/core/regexp/new_spec.rb index 65f612df55..79210e9a23 100644 --- a/core/regexp/new_spec.rb +++ b/core/regexp/new_spec.rb @@ -7,11 +7,11 @@ describe "Regexp.new given a String" do it_behaves_like :regexp_new_string, :new + it_behaves_like :regexp_new_string_binary, :new end describe "Regexp.new given a Regexp" do it_behaves_like :regexp_new_regexp, :new - it_behaves_like :regexp_new_string_binary, :new end describe "Regexp.new given a non-String/Regexp" do