aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/io
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/io')
-rw-r--r--spec/ruby/core/io/gets_spec.rb8
-rw-r--r--spec/ruby/core/io/readline_spec.rb8
-rw-r--r--spec/ruby/core/io/shared/each.rb10
-rw-r--r--spec/ruby/core/io/shared/readlines.rb8
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