diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-02 22:00:00 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-02 22:00:00 +0900 |
commit | bd0a7d8dd5a9e5e445c5efa7c7155850092889dc (patch) | |
tree | 24359c2b509f10f3b82814ab1a9e07a5dd820432 /ext | |
parent | 11ddfd4c91c32d1011805feeadb214c194a12646 (diff) |
Revert "[ruby/etc] Deprecate names under `Struct`"
This reverts commit 69f698d85ada116db5747873e53c597991bedff8.
Again.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/etc/etc.c | 8 | ||||
-rw-r--r-- | ext/etc/extconf.rb | 5 |
2 files changed, 0 insertions, 13 deletions
diff --git a/ext/etc/etc.c b/ext/etc/etc.c index 3bad435a19..2f3fbb737b 100644 --- a/ext/etc/etc.c +++ b/ext/etc/etc.c @@ -54,12 +54,6 @@ char *getlogin(); #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) 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) 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 b6ae7700da..435fbe7f3d 100644 --- a/ext/etc/extconf.rb +++ b/ext/etc/extconf.rb @@ -47,11 +47,6 @@ if !File.exist?("#{srcdir}/depend") %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") |