diff options
author | Benoit Daloze <eregontp@gmail.com> | 2019-04-27 18:53:23 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2019-04-27 18:53:23 +0200 |
commit | a1b4816759418ca8fe510e8739622fc5d77ab0f0 (patch) | |
tree | 9d4fb6091d0086817f5bde46bf1150e9130d34fd /spec/ruby/core/io | |
parent | 00c33d9c232ed1a79eda17acd7231ac93caa162b (diff) | |
download | ruby-a1b4816759418ca8fe510e8739622fc5d77ab0f0.tar.gz |
Update to ruby/spec@15c9619
Diffstat (limited to 'spec/ruby/core/io')
-rw-r--r-- | spec/ruby/core/io/gets_spec.rb | 8 | ||||
-rw-r--r-- | spec/ruby/core/io/readline_spec.rb | 8 | ||||
-rw-r--r-- | spec/ruby/core/io/shared/each.rb | 10 | ||||
-rw-r--r-- | spec/ruby/core/io/shared/readlines.rb | 8 |
4 files changed, 13 insertions, 21 deletions
diff --git a/spec/ruby/core/io/gets_spec.rb b/spec/ruby/core/io/gets_spec.rb index b22b226beb..525c7547cd 100644 --- a/spec/ruby/core/io/gets_spec.rb +++ b/spec/ruby/core/io/gets_spec.rb @@ -139,11 +139,9 @@ describe "IO#gets" do end end - ruby_version_is "2.4" do - describe "when passed chomp" do - it "returns the first line without a trailing newline character" do - @io.gets(chomp: true).should == IOSpecs.lines_without_newline_characters[0] - end + describe "when passed chomp" do + it "returns the first line without a trailing newline character" do + @io.gets(chomp: true).should == IOSpecs.lines_without_newline_characters[0] end end end diff --git a/spec/ruby/core/io/readline_spec.rb b/spec/ruby/core/io/readline_spec.rb index f82ba36a1d..3eae6bfa47 100644 --- a/spec/ruby/core/io/readline_spec.rb +++ b/spec/ruby/core/io/readline_spec.rb @@ -43,11 +43,9 @@ describe "IO#readline" do end end - ruby_version_is "2.4" do - describe "when passed chomp" do - it "returns the first line without a trailing newline character" do - @io.readline(chomp: true).should == IOSpecs.lines_without_newline_characters[0] - end + describe "when passed chomp" do + it "returns the first line without a trailing newline character" do + @io.readline(chomp: true).should == IOSpecs.lines_without_newline_characters[0] end end end diff --git a/spec/ruby/core/io/shared/each.rb b/spec/ruby/core/io/shared/each.rb index ac01a49df1..da562e03b1 100644 --- a/spec/ruby/core/io/shared/each.rb +++ b/spec/ruby/core/io/shared/each.rb @@ -156,12 +156,10 @@ describe :io_each, shared: true do end end - ruby_version_is "2.4" do - describe "when passed chomp" do - it "yields each line without trailing newline characters to the passed block" do - @io.send(@method, chomp: true) { |s| ScratchPad << s } - ScratchPad.recorded.should == IOSpecs.lines_without_newline_characters - end + describe "when passed chomp" do + it "yields each line without trailing newline characters to the passed block" do + @io.send(@method, chomp: true) { |s| ScratchPad << s } + ScratchPad.recorded.should == IOSpecs.lines_without_newline_characters end end end diff --git a/spec/ruby/core/io/shared/readlines.rb b/spec/ruby/core/io/shared/readlines.rb index f545d8876a..08d41e0a4c 100644 --- a/spec/ruby/core/io/shared/readlines.rb +++ b/spec/ruby/core/io/shared/readlines.rb @@ -18,11 +18,9 @@ describe :io_readlines, shared: true do (result ? result : ScratchPad.recorded).should == IOSpecs.lines_empty_separator end - ruby_version_is "2.4" do - it "yields a sequence of lines without trailing newline characters when chomp is passed" do - result = IO.send(@method, @name, chomp: true, &@object) - (result ? result : ScratchPad.recorded).should == IOSpecs.lines_without_newline_characters - end + it "yields a sequence of lines without trailing newline characters when chomp is passed" do + result = IO.send(@method, @name, chomp: true, &@object) + (result ? result : ScratchPad.recorded).should == IOSpecs.lines_without_newline_characters end end |