diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-27 20:38:57 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-27 20:38:57 +0000 |
commit | 50441014ffd3645f258e56b9415b7787c910408b (patch) | |
tree | 3d5eef5ad1ea7e389dc51fc87437664b984ac184 /spec/ruby/library/tempfile/open_spec.rb | |
parent | 49cd16bfaf4f03885058ce748119bc8ea2de735a (diff) |
Update to ruby/spec@cdd6ff7
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/library/tempfile/open_spec.rb')
-rw-r--r-- | spec/ruby/library/tempfile/open_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/ruby/library/tempfile/open_spec.rb b/spec/ruby/library/tempfile/open_spec.rb index 062d1a3fc2..c4c3d91051 100644 --- a/spec/ruby/library/tempfile/open_spec.rb +++ b/spec/ruby/library/tempfile/open_spec.rb @@ -41,6 +41,14 @@ describe "Tempfile.open" do Tempfile.open(["specs", ".tt"]) { |tempfile| @tempfile = tempfile } @tempfile.path.should =~ /specs.*\.tt$/ end + + it "passes the third argument (options) to open" do + Tempfile.open("specs", Dir.tmpdir, encoding: "IBM037:IBM037", binmode: true) do |tempfile| + @tempfile = tempfile + tempfile.external_encoding.should == Encoding.find("IBM037") + tempfile.binmode?.should be_true + end + end end describe "Tempfile.open when passed a block" do |