summaryrefslogtreecommitdiff
path: root/spec/ruby/core/kernel/open_spec.rb
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-01 15:41:50 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-01 15:41:50 +0000
commit4d7b0b9112f2adf9e87ef75056f930bf7c1f3dc4 (patch)
tree8d712e18a619a9720d181d0d44e8cc2474ff31ee /spec/ruby/core/kernel/open_spec.rb
parent821d9a2d30f2e0d3f9009dc001b4b49aaa63c66e (diff)
Update to ruby/spec@bacedc5
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/core/kernel/open_spec.rb')
-rw-r--r--spec/ruby/core/kernel/open_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/ruby/core/kernel/open_spec.rb b/spec/ruby/core/kernel/open_spec.rb
index 4e99061219..ff56dfa03b 100644
--- a/spec/ruby/core/kernel/open_spec.rb
+++ b/spec/ruby/core/kernel/open_spec.rb
@@ -33,13 +33,14 @@ describe "Kernel#open" do
@io = open("|date")
begin
@io.should be_kind_of(IO)
+ @io.read
ensure
@io.close
end
end
it "opens an io when called with a block" do
- @output = open("|date") { |f| f.gets }
+ @output = open("|date") { |f| f.read }
@output.should_not == ''
end
@@ -61,7 +62,7 @@ describe "Kernel#open" do
end
it "opens an io when called with a block" do
- @output = open("|date /t") { |f| f.gets }
+ @output = open("|date /t") { |f| f.read }
@output.should_not == ''
end
end