From f8f542bd9b5c15dd8d0f7facdfd33302c30d9c9b Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Thu, 22 Feb 2024 15:35:59 -0500 Subject: [PATCH] [ruby/pathname] Remove check for File.birthtime File.birthtime has existed since Ruby 2.2, and pathname requires Ruby >= 2.7.0, so the method will always be there. https://github.com/ruby/pathname/commit/aca9613bbf --- ext/pathname/extconf.rb | 1 - ext/pathname/pathname.c | 5 ----- 2 files changed, 6 deletions(-) diff --git a/ext/pathname/extconf.rb b/ext/pathname/extconf.rb index 84e68277aa..b4e1617b9e 100644 --- a/ext/pathname/extconf.rb +++ b/ext/pathname/extconf.rb @@ -1,4 +1,3 @@ # frozen_string_literal: false require 'mkmf' -have_func("rb_file_s_birthtime") create_makefile('pathname') diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c index 878f216fb5..cdecb3f897 100644 --- a/ext/pathname/pathname.c +++ b/ext/pathname/pathname.c @@ -479,7 +479,6 @@ path_atime(VALUE self) return rb_funcall(rb_cFile, id_atime, 1, get_strpath(self)); } -#if defined(HAVE_RB_FILE_S_BIRTHTIME) /* * call-seq: * pathname.birthtime -> time @@ -494,10 +493,6 @@ path_birthtime(VALUE self) { return rb_funcall(rb_cFile, id_birthtime, 1, get_strpath(self)); } -#else -/* check at compilation time for `respond_to?` */ -# define path_birthtime rb_f_notimplement -#endif /* * call-seq: