Skip to content

Commit 0a18f68

Browse files
committedOct 4, 2015
fix spec to properly handle the expected returns from #readlines
1 parent 2b648e9 commit 0a18f68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎spec/ruby/core/io/readlines_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@
111111
it "gets data from a fork when passed -" do
112112
lines = IO.readlines("|-")
113113

114-
if lines # parent
114+
if !lines.empty? # parent, #readlines always returns an array
115115
lines.should == ["hello\n", "from a fork\n"]
116-
else
116+
elsif lines.empty?
117117
puts "hello"
118118
puts "from a fork"
119119
exit!

0 commit comments

Comments
 (0)