ruby-changes:63251
From: Nobuyoshi <ko1@a...>
Date: Fri, 2 Oct 2020 08:47:05 +0900 (JST)
Subject: [ruby-changes:63251] c881678cd7 (master): Removed meaningless system dependent tests
https://git.ruby-lang.org/ruby.git/commit/?id=c881678cd7 From c881678cd75432f47903a5d1d8b86a7a723cb023 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 2 Oct 2020 08:43:33 +0900 Subject: Removed meaningless system dependent tests As [Bug #16662] lchmod available in linux since glibc 2.31.9000, a system call may exist or not exist depending on the version. It is not a spec nor responsibility of Ruby. diff --git a/spec/ruby/core/file/lchmod_spec.rb b/spec/ruby/core/file/lchmod_spec.rb index 4abe425..7420b95 100644 --- a/spec/ruby/core/file/lchmod_spec.rb +++ b/spec/ruby/core/file/lchmod_spec.rb @@ -29,22 +29,4 @@ describe "File.lchmod" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/file/lchmod_spec.rb#L29 File.stat(@lname).should.writable? end end - - platform_is :openbsd, :aix do - it "returns false from #respond_to?" do - File.respond_to?(:lchmod).should be_false - end - - it "raises a NotImplementedError when called" do - -> { File.lchmod 0, "foo" }.should raise_error(NotImplementedError) - end - end - - platform_is :linux do - it "raises a NotImplementedError or Errno::ENOTSUP when called" do - -> { File.lchmod 0, "foo" }.should raise_error(Exception) { |e| - [NotImplementedError, Errno::ENOTSUP].should include(e.class) - } - end - end end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/