ruby-changes:60621
From: Nobuyoshi <ko1@a...>
Date: Wed, 1 Apr 2020 19:40:54 +0900 (JST)
Subject: [ruby-changes:60621] fad0a1451b (master): Revert "[ruby/etc] Deprecate names under `Struct`"
https://git.ruby-lang.org/ruby.git/commit/?id=fad0a1451b From fad0a1451b6396c488b0876d05a64de844096292 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 1 Apr 2020 19:29:39 +0900 Subject: Revert "[ruby/etc] Deprecate names under `Struct`" This reverts commit 919b175afc389f8df6a3caa05ffdd28f5fc4bfca. Since 604689628dc64d050a68f1ebe5e06f9105474936, to let `try_run` work before LIBRUBY_SO is installed, `try_link` links against the static library which defines even symbols unexported in the shared library. diff --git a/ext/etc/etc.c b/ext/etc/etc.c index 3bad435..2f3fbb7 100644 --- a/ext/etc/etc.c +++ b/ext/etc/etc.c @@ -54,12 +54,6 @@ char *getlogin(); https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L54 #define RUBY_ETC_VERSION "1.1.0" -#ifdef HAVE_RB_DEPRECATE_CONSTANT -void rb_deprecate_constant(VALUE mod, const char *name); -#else -# define rb_deprecate_constant(mod,name) ((void)(mod),(void)(name)) -#endif - #include "constdefs.h" /* call-seq: @@ -1171,7 +1165,6 @@ Init_etc(void) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L1165 rb_define_const(mEtc, "Passwd", sPasswd); #endif rb_define_const(rb_cStruct, "Passwd", sPasswd); /* deprecated name */ - rb_deprecate_constant(rb_cStruct, "Passwd"); rb_extend_object(sPasswd, rb_mEnumerable); rb_define_singleton_method(sPasswd, "each", etc_each_passwd, 0); @@ -1207,7 +1200,6 @@ Init_etc(void) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L1200 rb_define_const(mEtc, "Group", sGroup); #endif rb_define_const(rb_cStruct, "Group", sGroup); /* deprecated name */ - rb_deprecate_constant(rb_cStruct, "Group"); rb_extend_object(sGroup, rb_mEnumerable); rb_define_singleton_method(sGroup, "each", etc_each_group, 0); #endif diff --git a/ext/etc/extconf.rb b/ext/etc/extconf.rb index b6ae770..435fbe7 100644 --- a/ext/etc/extconf.rb +++ b/ext/etc/extconf.rb @@ -47,11 +47,6 @@ if !File.exist?("#{srcdir}/depend") https://github.com/ruby/ruby/blob/trunk/ext/etc/extconf.rb#L47 %x[#{RbConfig.ruby} #{srcdir}/mkconstants.rb -o #{srcdir}/constdefs.h] end -decl = [ - "void rb_deprecate_constant(VALUE, const char *);", -] -have_func('rb_deprecate_constant(Qnil, "None")', [decl]) - $distcleanfiles << "constdefs.h" create_makefile("etc") -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/