ruby-changes:60646
From: Benoit <ko1@a...>
Date: Sat, 4 Apr 2020 08:03:46 +0900 (JST)
Subject: [ruby-changes:60646] 7f82c8cd47 (master): Update to ruby/spec@7289ea3
https://git.ruby-lang.org/ruby.git/commit/?id=7f82c8cd47 From 7f82c8cd470b5e262749c455f6e0cef055b365bb Mon Sep 17 00:00:00 2001 From: Benoit Daloze <eregontp@g...> Date: Sat, 4 Apr 2020 01:02:53 +0200 Subject: Update to ruby/spec@7289ea3 diff --git a/spec/ruby/core/file/lchmod_spec.rb b/spec/ruby/core/file/lchmod_spec.rb index 6a28bdc..bab3629 100644 --- a/spec/ruby/core/file/lchmod_spec.rb +++ b/spec/ruby/core/file/lchmod_spec.rb @@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/file/lchmod_spec.rb#L1 require_relative '../../spec_helper' describe "File.lchmod" do - guard -> { File.respond_to?(:lchmod) } do + platform_is_not :linux, :windows, :openbsd, :solaris, :aix do before :each do @fname = tmp('file_chmod_test') @lname = @fname + '.lnk' @@ -30,9 +30,21 @@ describe "File.lchmod" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/file/lchmod_spec.rb#L30 end end - guard_not -> { File.respond_to?(:lchmod) } do + 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 diff --git a/spec/ruby/optional/capi/ext/rubyspec.h b/spec/ruby/optional/capi/ext/rubyspec.h index 32724b1..8d75cfc 100644 --- a/spec/ruby/optional/capi/ext/rubyspec.h +++ b/spec/ruby/optional/capi/ext/rubyspec.h @@ -1,9 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/spec/ruby/optional/capi/ext/rubyspec.h#L1 #ifndef RUBYSPEC_H #define RUBYSPEC_H -/* Define convenience macros similar to the mspec guards to assist - * with version incompatibilities. - */ +/* Define convenience macros similar to the mspec + * guards to assist with version incompatibilities. */ #include <ruby.h> #ifdef HAVE_RUBY_VERSION_H -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/