From 5ad6d09405ab233d9541831764c872f57c3a5390 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Thu, 4 Jul 2024 02:21:56 +1000 Subject: [PATCH] Remove unneeded duplicate words --- core/complex/equal_value_spec.rb | 2 +- core/fiber/raise_spec.rb | 2 +- core/float/comparison_spec.rb | 2 +- core/hash/element_reference_spec.rb | 2 +- core/io/puts_spec.rb | 2 +- core/string/byteslice_spec.rb | 2 +- fixtures/constants.rb | 2 +- language/regexp_spec.rb | 2 +- language/super_spec.rb | 2 +- library/socket/addrinfo/initialize_spec.rb | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/complex/equal_value_spec.rb b/core/complex/equal_value_spec.rb index ad7236b1bd..97c486d820 100644 --- a/core/complex/equal_value_spec.rb +++ b/core/complex/equal_value_spec.rb @@ -76,7 +76,7 @@ (Complex(real, 0) == @other).should be_true end - it "returns false when when the imaginary part is not zero" do + it "returns false when the imaginary part is not zero" do (Complex(3, 1) == @other).should be_false end end diff --git a/core/fiber/raise_spec.rb b/core/fiber/raise_spec.rb index b3e021e636..2f2baa4a12 100644 --- a/core/fiber/raise_spec.rb +++ b/core/fiber/raise_spec.rb @@ -42,7 +42,7 @@ -> { FiberSpecs::NewFiberToRaise.raise FiberSpecs::CustomError, 'test error' }.should raise_error(FiberSpecs::CustomError, 'test error') end - it 'accepts error class with with error message and backtrace information' do + it 'accepts error class with error message and backtrace information' do -> { FiberSpecs::NewFiberToRaise.raise FiberSpecs::CustomError, 'test error', ['foo', 'boo'] }.should raise_error(FiberSpecs::CustomError) { |e| diff --git a/core/float/comparison_spec.rb b/core/float/comparison_spec.rb index 1373b3a1fb..d2e47937ff 100644 --- a/core/float/comparison_spec.rb +++ b/core/float/comparison_spec.rb @@ -72,7 +72,7 @@ def coerce(other) (-Float::MAX.to_i*2 <=> -infinity_value).should == 1 end - it "returns 0 when self is Infinity and other other is infinite?=1" do + it "returns 0 when self is Infinity and other is infinite?=1" do obj = Object.new def obj.infinite? 1 diff --git a/core/hash/element_reference_spec.rb b/core/hash/element_reference_spec.rb index 94e8237839..d5859cb342 100644 --- a/core/hash/element_reference_spec.rb +++ b/core/hash/element_reference_spec.rb @@ -12,7 +12,7 @@ h[[]].should == "baz" end - it "returns nil as default default value" do + it "returns nil as default value" do { 0 => 0 }[5].should == nil end diff --git a/core/io/puts_spec.rb b/core/io/puts_spec.rb index 9ed343c94c..a186ddaa5d 100644 --- a/core/io/puts_spec.rb +++ b/core/io/puts_spec.rb @@ -33,7 +33,7 @@ def @io.write(str) ScratchPad.recorded.should == "\n" end - it "writes empty string with a newline when when given nil as multiple args" do + it "writes empty string with a newline when given nil as multiple args" do @io.puts(nil, nil).should == nil ScratchPad.recorded.should == "\n\n" end diff --git a/core/string/byteslice_spec.rb b/core/string/byteslice_spec.rb index 5b1027f4a5..9fe504aeb1 100644 --- a/core/string/byteslice_spec.rb +++ b/core/string/byteslice_spec.rb @@ -17,7 +17,7 @@ it_behaves_like :string_slice_range, :byteslice end -describe "String#byteslice on on non ASCII strings" do +describe "String#byteslice on non ASCII strings" do it "returns byteslice of unicode strings" do "\u3042".byteslice(1).should == "\x81".dup.force_encoding("UTF-8") "\u3042".byteslice(1, 2).should == "\x81\x82".dup.force_encoding("UTF-8") diff --git a/fixtures/constants.rb b/fixtures/constants.rb index ffe45fb1f6..7f0b88daab 100644 --- a/fixtures/constants.rb +++ b/fixtures/constants.rb @@ -10,7 +10,7 @@ # variety in class and module configurations, including hierarchy, # containment, inclusion, singletons and toplevel. # -# Constants are numbered for for uniqueness. The CS_ prefix is uniformly used +# Constants are numbered for uniqueness. The CS_ prefix is uniformly used # and is to minimize clashes with other toplevel constants (see e.g. ModuleA # which is included in Object). Constant values are symbols. A numbered suffix # is used to distinguish constants with the same name defined in different diff --git a/language/regexp_spec.rb b/language/regexp_spec.rb index 89d0914807..dbf341b19e 100644 --- a/language/regexp_spec.rb +++ b/language/regexp_spec.rb @@ -62,7 +62,7 @@ end end - it "supports non-paired delimiters delimiters with %r" do + it "supports non-paired delimiters with %r" do LanguageSpecs.non_paired_delimiters.each do |c| eval("%r#{c} foo #{c}").should == / foo / end diff --git a/language/super_spec.rb b/language/super_spec.rb index a98b3b3091..7d9e896d8b 100644 --- a/language/super_spec.rb +++ b/language/super_spec.rb @@ -70,7 +70,7 @@ SuperSpecs::S4::B.new.foo([],"test").should == ["B#foo(a,test)", "A#foo"] end - it "raises an error error when super method does not exist" do + it "raises an error when super method does not exist" do sup = Class.new sub_normal = Class.new(sup) do def foo diff --git a/library/socket/addrinfo/initialize_spec.rb b/library/socket/addrinfo/initialize_spec.rb index 83b204b575..d8885c5d62 100644 --- a/library/socket/addrinfo/initialize_spec.rb +++ b/library/socket/addrinfo/initialize_spec.rb @@ -335,7 +335,7 @@ @sockaddr = ['AF_INET6', 80, 'hostname', '127.0.0.1'] end - it "raises SocketError when using any Socket constant except except AF_INET(6)/PF_INET(6)" do + it "raises SocketError when using any Socket constant except AF_INET(6)/PF_INET(6)" do Socket.constants.grep(/(^AF_|^PF_)(?!INET)/).each do |constant| value = Socket.const_get(constant) -> {