diff options
Diffstat (limited to 'spec/ruby/core/file/open_spec.rb')
-rw-r--r-- | spec/ruby/core/file/open_spec.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/spec/ruby/core/file/open_spec.rb b/spec/ruby/core/file/open_spec.rb index 0c6d6cd19c..0346224b93 100644 --- a/spec/ruby/core/file/open_spec.rb +++ b/spec/ruby/core/file/open_spec.rb @@ -565,15 +565,13 @@ describe "File.open" do File.open(@file, 'wb+') {|f| f.external_encoding.should == Encoding::BINARY} end - ruby_version_is "3.0" do - it "accepts options as a keyword argument" do - @fh = File.open(@file, 'w', 0755, flags: File::CREAT) - @fh.should be_an_instance_of(File) + it "accepts options as a keyword argument" do + @fh = File.open(@file, 'w', 0755, flags: File::CREAT) + @fh.should be_an_instance_of(File) - -> { - File.open(@file, 'w', 0755, {flags: File::CREAT}) - }.should raise_error(ArgumentError, "wrong number of arguments (given 4, expected 1..3)") - end + -> { + File.open(@file, 'w', 0755, {flags: File::CREAT}) + }.should raise_error(ArgumentError, "wrong number of arguments (given 4, expected 1..3)") end it "uses the second argument as an options Hash" do |