summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/-test-/RUBY_ALIGNOF/depend1
-rw-r--r--ext/-test-/arith_seq/extract/depend25
-rw-r--r--ext/-test-/array/concat/depend478
-rw-r--r--ext/-test-/array/concat/to_ary_concat.c (renamed from ext/-test-/array/concat/to_ary_conact.c)8
-rw-r--r--ext/-test-/array/resize/depend25
-rw-r--r--ext/-test-/bignum/depend187
-rw-r--r--ext/-test-/bug-14834/depend27
-rw-r--r--ext/-test-/bug-3571/depend25
-rw-r--r--ext/-test-/bug-5832/depend25
-rw-r--r--ext/-test-/bug_reporter/depend25
-rw-r--r--ext/-test-/class/depend50
-rw-r--r--ext/-test-/cxxanyargs/depend12
-rw-r--r--ext/-test-/debug/depend79
-rw-r--r--ext/-test-/enumerator_kw/depend25
-rw-r--r--ext/-test-/exception/depend4
-rw-r--r--ext/-test-/fatal/depend25
-rw-r--r--ext/-test-/file/depend3
-rw-r--r--ext/-test-/file/fs.c2
-rw-r--r--ext/-test-/float/depend50
-rw-r--r--ext/-test-/funcall/depend25
-rw-r--r--ext/-test-/gvl/call_without_gvl/depend25
-rw-r--r--ext/-test-/hash/depend50
-rw-r--r--ext/-test-/integer/depend78
-rw-r--r--ext/-test-/iseq_load/depend25
-rw-r--r--ext/-test-/iter/depend75
-rw-r--r--ext/-test-/load/protect/depend25
-rw-r--r--ext/-test-/marshal/compat/depend25
-rw-r--r--ext/-test-/marshal/internal_ivar/depend25
-rw-r--r--ext/-test-/marshal/usr/depend25
-rw-r--r--ext/-test-/memory_status/depend1
-rw-r--r--ext/-test-/memory_view/depend1
-rw-r--r--ext/-test-/method/depend50
-rw-r--r--ext/-test-/notimplement/depend25
-rw-r--r--ext/-test-/num2int/depend25
-rw-r--r--ext/-test-/path_to_class/depend25
-rw-r--r--ext/-test-/postponed_job/depend27
-rw-r--r--ext/-test-/postponed_job/postponed_job.c31
-rw-r--r--ext/-test-/printf/depend1
-rw-r--r--ext/-test-/proc/depend75
-rw-r--r--ext/-test-/random/depend6
-rw-r--r--ext/-test-/rational/depend28
-rw-r--r--ext/-test-/rb_call_super_kw/depend25
-rw-r--r--ext/-test-/recursion/depend25
-rw-r--r--ext/-test-/regexp/depend50
-rw-r--r--ext/-test-/scan_args/depend25
-rw-r--r--ext/-test-/st/foreach/depend25
-rw-r--r--ext/-test-/st/numhash/depend25
-rw-r--r--ext/-test-/st/update/depend25
-rw-r--r--ext/-test-/string/depend19
-rw-r--r--ext/-test-/struct/depend100
-rw-r--r--ext/-test-/symbol/depend50
-rw-r--r--ext/-test-/thread_fd/depend25
-rw-r--r--ext/-test-/time/depend76
-rw-r--r--ext/-test-/tracepoint/depend54
-rw-r--r--ext/-test-/typeddata/depend25
-rw-r--r--ext/-test-/vm/depend25
-rw-r--r--ext/-test-/wait/depend164
-rw-r--r--ext/bigdecimal/bigdecimal.c978
-rw-r--r--ext/bigdecimal/bigdecimal.gemspec4
-rw-r--r--ext/bigdecimal/depend2
-rw-r--r--ext/bigdecimal/extconf.rb5
-rw-r--r--ext/cgi/escape/depend1
-rw-r--r--ext/cgi/escape/escape.c12
-rw-r--r--ext/continuation/depend25
-rw-r--r--ext/coverage/coverage.c2
-rw-r--r--ext/date/date.gemspec7
-rw-r--r--ext/date/date_core.c387
-rw-r--r--ext/date/depend4
-rw-r--r--ext/date/lib/date.rb1
-rw-r--r--ext/digest/bubblebabble/depend25
-rw-r--r--ext/digest/depend25
-rw-r--r--ext/digest/digest.gemspec9
-rw-r--r--ext/digest/extconf.rb2
-rw-r--r--ext/digest/lib/digest.rb27
-rw-r--r--ext/digest/lib/digest/version.rb5
-rw-r--r--ext/digest/md5/depend2
-rw-r--r--ext/digest/md5/md5.c2
-rw-r--r--ext/digest/rmd160/depend2
-rw-r--r--ext/digest/sha1/depend2
-rw-r--r--ext/digest/sha2/depend2
-rw-r--r--ext/digest/sha2/sha2.c2
-rw-r--r--ext/etc/depend1
-rw-r--r--ext/etc/etc.c20
-rw-r--r--ext/etc/etc.gemspec13
-rw-r--r--ext/etc/extconf.rb1
-rw-r--r--ext/fcntl/depend25
-rw-r--r--ext/fcntl/fcntl.c17
-rw-r--r--ext/fiddle/depend8
-rw-r--r--ext/fiddle/extconf.rb2
-rw-r--r--ext/io/console/console.c10
-rw-r--r--ext/io/console/depend1
-rw-r--r--ext/io/console/io-console.gemspec4
-rw-r--r--ext/io/nonblock/depend1
-rw-r--r--ext/io/wait/depend2
-rw-r--r--ext/io/wait/extconf.rb1
-rw-r--r--ext/io/wait/io-wait.gemspec4
-rw-r--r--ext/io/wait/wait.c165
-rw-r--r--ext/json/generator/depend1
-rw-r--r--ext/json/parser/depend1
-rw-r--r--ext/monitor/depend25
-rw-r--r--ext/nkf/depend1
-rw-r--r--ext/nkf/nkf.c2
-rw-r--r--ext/objspace/depend10
-rw-r--r--ext/objspace/object_tracing.c3
-rw-r--r--ext/objspace/objspace.c1
-rw-r--r--ext/openssl/History.md104
-rw-r--r--ext/openssl/extconf.rb1
-rw-r--r--ext/openssl/lib/openssl/pkey.rb50
-rw-r--r--ext/openssl/lib/openssl/version.rb2
-rw-r--r--ext/openssl/lib/openssl/x509.rb18
-rw-r--r--ext/openssl/openssl.gemspec2
-rw-r--r--ext/openssl/openssl_missing.c3
-rw-r--r--ext/openssl/ossl.h8
-rw-r--r--ext/openssl/ossl_engine.c3
-rw-r--r--ext/openssl/ossl_hmac.c4
-rw-r--r--ext/openssl/ossl_ocsp.c2
-rw-r--r--ext/openssl/ossl_pkey.c107
-rw-r--r--ext/openssl/ossl_pkey.h32
-rw-r--r--ext/openssl/ossl_pkey_dh.c84
-rw-r--r--ext/openssl/ossl_pkey_dsa.c97
-rw-r--r--ext/openssl/ossl_pkey_ec.c112
-rw-r--r--ext/openssl/ossl_pkey_rsa.c100
-rw-r--r--ext/openssl/ossl_ssl.c266
-rw-r--r--ext/openssl/ossl_x509name.c11
-rw-r--r--ext/pathname/depend1
-rw-r--r--ext/pathname/pathname.c1
-rw-r--r--ext/pathname/pathname.gemspec2
-rw-r--r--ext/psych/depend50
-rw-r--r--ext/psych/lib/psych.rb14
-rw-r--r--ext/psych/lib/psych/nodes/node.rb4
-rw-r--r--ext/psych/lib/psych/scalar_scanner.rb23
-rw-r--r--ext/psych/lib/psych/versions.rb2
-rw-r--r--ext/psych/lib/psych/visitors/to_ruby.rb4
-rw-r--r--ext/psych/psych.gemspec2
-rw-r--r--ext/pty/depend1
-rw-r--r--ext/pty/pty.c9
-rw-r--r--ext/racc/cparse/depend25
-rw-r--r--ext/rbconfig/sizeof/depend50
-rw-r--r--ext/readline/depend1
-rw-r--r--ext/readline/readline-ext.gemspec2
-rw-r--r--ext/readline/readline.c1
-rw-r--r--ext/ripper/depend2
-rw-r--r--ext/ripper/extconf.rb3
-rw-r--r--ext/ripper/lib/ripper/lexer.rb82
-rw-r--r--ext/socket/depend15
-rw-r--r--ext/socket/extconf.rb7
-rw-r--r--ext/socket/socket.c5
-rw-r--r--ext/stringio/depend1
-rw-r--r--ext/strscan/depend1
-rw-r--r--ext/syslog/depend25
-rw-r--r--ext/win32ole/win32ole.gemspec1
-rw-r--r--ext/win32ole/win32ole_method.c2
-rw-r--r--ext/win32ole/win32ole_variable.c1
-rw-r--r--ext/zlib/depend1
-rw-r--r--ext/zlib/extlibs8
-rw-r--r--ext/zlib/zlib.c121
156 files changed, 3236 insertions, 2576 deletions
diff --git a/ext/-test-/RUBY_ALIGNOF/depend b/ext/-test-/RUBY_ALIGNOF/depend
index 14dac0974c5..f12fdf59cc7 100644
--- a/ext/-test-/RUBY_ALIGNOF/depend
+++ b/ext/-test-/RUBY_ALIGNOF/depend
@@ -7,7 +7,6 @@ c.o: $(hdrdir)/ruby/backward.h
c.o: $(hdrdir)/ruby/backward/2/assume.h
c.o: $(hdrdir)/ruby/backward/2/attributes.h
c.o: $(hdrdir)/ruby/backward/2/bool.h
-c.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
c.o: $(hdrdir)/ruby/backward/2/inttypes.h
c.o: $(hdrdir)/ruby/backward/2/limits.h
c.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/-test-/arith_seq/extract/depend b/ext/-test-/arith_seq/extract/depend
index 8bf12c5f47d..ac778252753 100644
--- a/ext/-test-/arith_seq/extract/depend
+++ b/ext/-test-/arith_seq/extract/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
extract.o: $(RUBY_EXTCONF_H)
extract.o: $(arch_hdrdir)/ruby/config.h
+extract.o: $(hdrdir)/ruby/assert.h
+extract.o: $(hdrdir)/ruby/backward.h
+extract.o: $(hdrdir)/ruby/backward/2/assume.h
+extract.o: $(hdrdir)/ruby/backward/2/attributes.h
+extract.o: $(hdrdir)/ruby/backward/2/bool.h
+extract.o: $(hdrdir)/ruby/backward/2/inttypes.h
+extract.o: $(hdrdir)/ruby/backward/2/limits.h
+extract.o: $(hdrdir)/ruby/backward/2/long_long.h
+extract.o: $(hdrdir)/ruby/backward/2/stdalign.h
+extract.o: $(hdrdir)/ruby/backward/2/stdarg.h
+extract.o: $(hdrdir)/ruby/defines.h
+extract.o: $(hdrdir)/ruby/intern.h
extract.o: $(hdrdir)/ruby/internal/anyargs.h
extract.o: $(hdrdir)/ruby/internal/arithmetic.h
extract.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ extract.o: $(hdrdir)/ruby/internal/value_type.h
extract.o: $(hdrdir)/ruby/internal/variable.h
extract.o: $(hdrdir)/ruby/internal/warning_push.h
extract.o: $(hdrdir)/ruby/internal/xmalloc.h
-extract.o: $(hdrdir)/ruby/assert.h
-extract.o: $(hdrdir)/ruby/backward.h
-extract.o: $(hdrdir)/ruby/backward/2/assume.h
-extract.o: $(hdrdir)/ruby/backward/2/attributes.h
-extract.o: $(hdrdir)/ruby/backward/2/bool.h
-extract.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-extract.o: $(hdrdir)/ruby/backward/2/inttypes.h
-extract.o: $(hdrdir)/ruby/backward/2/limits.h
-extract.o: $(hdrdir)/ruby/backward/2/long_long.h
-extract.o: $(hdrdir)/ruby/backward/2/stdalign.h
-extract.o: $(hdrdir)/ruby/backward/2/stdarg.h
-extract.o: $(hdrdir)/ruby/defines.h
-extract.o: $(hdrdir)/ruby/intern.h
extract.o: $(hdrdir)/ruby/missing.h
extract.o: $(hdrdir)/ruby/ruby.h
extract.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/array/concat/depend b/ext/-test-/array/concat/depend
index ba069376a44..e1d49bc6486 100644
--- a/ext/-test-/array/concat/depend
+++ b/ext/-test-/array/concat/depend
@@ -1,321 +1,161 @@
# AUTOGENERATED DEPENDENCIES START
-resize.o: $(RUBY_EXTCONF_H)
-resize.o: $(arch_hdrdir)/ruby/config.h
-resize.o: $(hdrdir)/ruby/assert.h
-resize.o: $(hdrdir)/ruby/backward.h
-resize.o: $(hdrdir)/ruby/backward/2/assume.h
-resize.o: $(hdrdir)/ruby/backward/2/attributes.h
-resize.o: $(hdrdir)/ruby/backward/2/bool.h
-resize.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-resize.o: $(hdrdir)/ruby/backward/2/inttypes.h
-resize.o: $(hdrdir)/ruby/backward/2/limits.h
-resize.o: $(hdrdir)/ruby/backward/2/long_long.h
-resize.o: $(hdrdir)/ruby/backward/2/stdalign.h
-resize.o: $(hdrdir)/ruby/backward/2/stdarg.h
-resize.o: $(hdrdir)/ruby/defines.h
-resize.o: $(hdrdir)/ruby/intern.h
-resize.o: $(hdrdir)/ruby/internal/anyargs.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/char.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/double.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/int.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/long.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/short.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
-resize.o: $(hdrdir)/ruby/internal/assume.h
-resize.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
-resize.o: $(hdrdir)/ruby/internal/attr/artificial.h
-resize.o: $(hdrdir)/ruby/internal/attr/cold.h
-resize.o: $(hdrdir)/ruby/internal/attr/const.h
-resize.o: $(hdrdir)/ruby/internal/attr/constexpr.h
-resize.o: $(hdrdir)/ruby/internal/attr/deprecated.h
-resize.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
-resize.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
-resize.o: $(hdrdir)/ruby/internal/attr/error.h
-resize.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
-resize.o: $(hdrdir)/ruby/internal/attr/forceinline.h
-resize.o: $(hdrdir)/ruby/internal/attr/format.h
-resize.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
-resize.o: $(hdrdir)/ruby/internal/attr/noalias.h
-resize.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
-resize.o: $(hdrdir)/ruby/internal/attr/noexcept.h
-resize.o: $(hdrdir)/ruby/internal/attr/noinline.h
-resize.o: $(hdrdir)/ruby/internal/attr/nonnull.h
-resize.o: $(hdrdir)/ruby/internal/attr/noreturn.h
-resize.o: $(hdrdir)/ruby/internal/attr/pure.h
-resize.o: $(hdrdir)/ruby/internal/attr/restrict.h
-resize.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
-resize.o: $(hdrdir)/ruby/internal/attr/warning.h
-resize.o: $(hdrdir)/ruby/internal/attr/weakref.h
-resize.o: $(hdrdir)/ruby/internal/cast.h
-resize.o: $(hdrdir)/ruby/internal/compiler_is.h
-resize.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
-resize.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
-resize.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
-resize.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
-resize.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
-resize.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
-resize.o: $(hdrdir)/ruby/internal/compiler_since.h
-resize.o: $(hdrdir)/ruby/internal/config.h
-resize.o: $(hdrdir)/ruby/internal/constant_p.h
-resize.o: $(hdrdir)/ruby/internal/core.h
-resize.o: $(hdrdir)/ruby/internal/core/rarray.h
-resize.o: $(hdrdir)/ruby/internal/core/rbasic.h
-resize.o: $(hdrdir)/ruby/internal/core/rbignum.h
-resize.o: $(hdrdir)/ruby/internal/core/rclass.h
-resize.o: $(hdrdir)/ruby/internal/core/rdata.h
-resize.o: $(hdrdir)/ruby/internal/core/rfile.h
-resize.o: $(hdrdir)/ruby/internal/core/rhash.h
-resize.o: $(hdrdir)/ruby/internal/core/robject.h
-resize.o: $(hdrdir)/ruby/internal/core/rregexp.h
-resize.o: $(hdrdir)/ruby/internal/core/rstring.h
-resize.o: $(hdrdir)/ruby/internal/core/rstruct.h
-resize.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
-resize.o: $(hdrdir)/ruby/internal/ctype.h
-resize.o: $(hdrdir)/ruby/internal/dllexport.h
-resize.o: $(hdrdir)/ruby/internal/dosish.h
-resize.o: $(hdrdir)/ruby/internal/error.h
-resize.o: $(hdrdir)/ruby/internal/eval.h
-resize.o: $(hdrdir)/ruby/internal/event.h
-resize.o: $(hdrdir)/ruby/internal/fl_type.h
-resize.o: $(hdrdir)/ruby/internal/gc.h
-resize.o: $(hdrdir)/ruby/internal/glob.h
-resize.o: $(hdrdir)/ruby/internal/globals.h
-resize.o: $(hdrdir)/ruby/internal/has/attribute.h
-resize.o: $(hdrdir)/ruby/internal/has/builtin.h
-resize.o: $(hdrdir)/ruby/internal/has/c_attribute.h
-resize.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
-resize.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
-resize.o: $(hdrdir)/ruby/internal/has/extension.h
-resize.o: $(hdrdir)/ruby/internal/has/feature.h
-resize.o: $(hdrdir)/ruby/internal/has/warning.h
-resize.o: $(hdrdir)/ruby/internal/intern/array.h
-resize.o: $(hdrdir)/ruby/internal/intern/bignum.h
-resize.o: $(hdrdir)/ruby/internal/intern/class.h
-resize.o: $(hdrdir)/ruby/internal/intern/compar.h
-resize.o: $(hdrdir)/ruby/internal/intern/complex.h
-resize.o: $(hdrdir)/ruby/internal/intern/cont.h
-resize.o: $(hdrdir)/ruby/internal/intern/dir.h
-resize.o: $(hdrdir)/ruby/internal/intern/enum.h
-resize.o: $(hdrdir)/ruby/internal/intern/enumerator.h
-resize.o: $(hdrdir)/ruby/internal/intern/error.h
-resize.o: $(hdrdir)/ruby/internal/intern/eval.h
-resize.o: $(hdrdir)/ruby/internal/intern/file.h
-resize.o: $(hdrdir)/ruby/internal/intern/gc.h
-resize.o: $(hdrdir)/ruby/internal/intern/hash.h
-resize.o: $(hdrdir)/ruby/internal/intern/io.h
-resize.o: $(hdrdir)/ruby/internal/intern/load.h
-resize.o: $(hdrdir)/ruby/internal/intern/marshal.h
-resize.o: $(hdrdir)/ruby/internal/intern/numeric.h
-resize.o: $(hdrdir)/ruby/internal/intern/object.h
-resize.o: $(hdrdir)/ruby/internal/intern/parse.h
-resize.o: $(hdrdir)/ruby/internal/intern/proc.h
-resize.o: $(hdrdir)/ruby/internal/intern/process.h
-resize.o: $(hdrdir)/ruby/internal/intern/random.h
-resize.o: $(hdrdir)/ruby/internal/intern/range.h
-resize.o: $(hdrdir)/ruby/internal/intern/rational.h
-resize.o: $(hdrdir)/ruby/internal/intern/re.h
-resize.o: $(hdrdir)/ruby/internal/intern/ruby.h
-resize.o: $(hdrdir)/ruby/internal/intern/select.h
-resize.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
-resize.o: $(hdrdir)/ruby/internal/intern/signal.h
-resize.o: $(hdrdir)/ruby/internal/intern/sprintf.h
-resize.o: $(hdrdir)/ruby/internal/intern/string.h
-resize.o: $(hdrdir)/ruby/internal/intern/struct.h
-resize.o: $(hdrdir)/ruby/internal/intern/thread.h
-resize.o: $(hdrdir)/ruby/internal/intern/time.h
-resize.o: $(hdrdir)/ruby/internal/intern/variable.h
-resize.o: $(hdrdir)/ruby/internal/intern/vm.h
-resize.o: $(hdrdir)/ruby/internal/interpreter.h
-resize.o: $(hdrdir)/ruby/internal/iterator.h
-resize.o: $(hdrdir)/ruby/internal/memory.h
-resize.o: $(hdrdir)/ruby/internal/method.h
-resize.o: $(hdrdir)/ruby/internal/module.h
-resize.o: $(hdrdir)/ruby/internal/newobj.h
-resize.o: $(hdrdir)/ruby/internal/rgengc.h
-resize.o: $(hdrdir)/ruby/internal/scan_args.h
-resize.o: $(hdrdir)/ruby/internal/special_consts.h
-resize.o: $(hdrdir)/ruby/internal/static_assert.h
-resize.o: $(hdrdir)/ruby/internal/stdalign.h
-resize.o: $(hdrdir)/ruby/internal/stdbool.h
-resize.o: $(hdrdir)/ruby/internal/symbol.h
-resize.o: $(hdrdir)/ruby/internal/value.h
-resize.o: $(hdrdir)/ruby/internal/value_type.h
-resize.o: $(hdrdir)/ruby/internal/variable.h
-resize.o: $(hdrdir)/ruby/internal/warning_push.h
-resize.o: $(hdrdir)/ruby/internal/xmalloc.h
-resize.o: $(hdrdir)/ruby/missing.h
-resize.o: $(hdrdir)/ruby/ruby.h
-resize.o: $(hdrdir)/ruby/st.h
-resize.o: $(hdrdir)/ruby/subst.h
-resize.o: resize.c
-to_ary_conact.o: $(RUBY_EXTCONF_H)
-to_ary_conact.o: $(arch_hdrdir)/ruby/config.h
-to_ary_conact.o: $(hdrdir)/ruby.h
-to_ary_conact.o: $(hdrdir)/ruby/assert.h
-to_ary_conact.o: $(hdrdir)/ruby/backward.h
-to_ary_conact.o: $(hdrdir)/ruby/backward/2/assume.h
-to_ary_conact.o: $(hdrdir)/ruby/backward/2/attributes.h
-to_ary_conact.o: $(hdrdir)/ruby/backward/2/bool.h
-to_ary_conact.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-to_ary_conact.o: $(hdrdir)/ruby/backward/2/inttypes.h
-to_ary_conact.o: $(hdrdir)/ruby/backward/2/limits.h
-to_ary_conact.o: $(hdrdir)/ruby/backward/2/long_long.h
-to_ary_conact.o: $(hdrdir)/ruby/backward/2/stdalign.h
-to_ary_conact.o: $(hdrdir)/ruby/backward/2/stdarg.h
-to_ary_conact.o: $(hdrdir)/ruby/defines.h
-to_ary_conact.o: $(hdrdir)/ruby/intern.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/anyargs.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/arithmetic.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/arithmetic/char.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/arithmetic/double.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/arithmetic/int.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/arithmetic/long.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/arithmetic/short.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/assume.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/artificial.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/cold.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/const.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/constexpr.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/deprecated.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/error.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/forceinline.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/format.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/noalias.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/noexcept.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/noinline.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/nonnull.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/noreturn.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/pure.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/restrict.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/warning.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/attr/weakref.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/cast.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/compiler_is.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/compiler_since.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/config.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/constant_p.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/core.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/core/rarray.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/core/rbasic.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/core/rbignum.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/core/rclass.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/core/rdata.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/core/rfile.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/core/rhash.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/core/robject.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/core/rregexp.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/core/rstring.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/core/rstruct.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/ctype.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/dllexport.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/dosish.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/error.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/eval.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/event.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/fl_type.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/gc.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/glob.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/globals.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/has/attribute.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/has/builtin.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/has/c_attribute.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/has/extension.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/has/feature.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/has/warning.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/array.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/bignum.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/class.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/compar.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/complex.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/cont.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/dir.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/enum.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/enumerator.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/error.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/eval.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/file.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/gc.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/hash.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/io.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/load.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/marshal.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/numeric.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/object.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/parse.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/proc.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/process.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/random.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/range.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/rational.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/re.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/ruby.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/select.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/signal.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/sprintf.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/string.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/struct.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/thread.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/time.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/variable.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/intern/vm.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/interpreter.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/iterator.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/memory.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/method.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/module.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/newobj.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/rgengc.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/scan_args.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/special_consts.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/static_assert.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/stdalign.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/stdbool.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/symbol.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/value.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/value_type.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/variable.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/warning_push.h
-to_ary_conact.o: $(hdrdir)/ruby/internal/xmalloc.h
-to_ary_conact.o: $(hdrdir)/ruby/missing.h
-to_ary_conact.o: $(hdrdir)/ruby/ruby.h
-to_ary_conact.o: $(hdrdir)/ruby/st.h
-to_ary_conact.o: $(hdrdir)/ruby/subst.h
-to_ary_conact.o: to_ary_conact.c
+to_ary_concat.o: $(RUBY_EXTCONF_H)
+to_ary_concat.o: $(arch_hdrdir)/ruby/config.h
+to_ary_concat.o: $(hdrdir)/ruby.h
+to_ary_concat.o: $(hdrdir)/ruby/assert.h
+to_ary_concat.o: $(hdrdir)/ruby/backward.h
+to_ary_concat.o: $(hdrdir)/ruby/backward/2/assume.h
+to_ary_concat.o: $(hdrdir)/ruby/backward/2/attributes.h
+to_ary_concat.o: $(hdrdir)/ruby/backward/2/bool.h
+to_ary_concat.o: $(hdrdir)/ruby/backward/2/inttypes.h
+to_ary_concat.o: $(hdrdir)/ruby/backward/2/limits.h
+to_ary_concat.o: $(hdrdir)/ruby/backward/2/long_long.h
+to_ary_concat.o: $(hdrdir)/ruby/backward/2/stdalign.h
+to_ary_concat.o: $(hdrdir)/ruby/backward/2/stdarg.h
+to_ary_concat.o: $(hdrdir)/ruby/defines.h
+to_ary_concat.o: $(hdrdir)/ruby/intern.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/anyargs.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/assume.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/artificial.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/cold.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/const.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/error.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/format.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/noalias.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/noinline.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/pure.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/restrict.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/warning.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/weakref.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/cast.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/compiler_is.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/compiler_since.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/config.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/constant_p.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rarray.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rbasic.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rbignum.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rclass.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rdata.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rfile.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rhash.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/robject.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rregexp.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rstring.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rstruct.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/ctype.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/dllexport.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/dosish.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/error.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/eval.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/event.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/fl_type.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/gc.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/glob.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/globals.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/has/attribute.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/has/builtin.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/has/extension.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/has/feature.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/has/warning.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/array.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/bignum.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/class.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/compar.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/complex.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/cont.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/dir.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/enum.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/error.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/eval.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/file.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/gc.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/hash.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/io.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/load.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/marshal.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/numeric.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/object.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/parse.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/proc.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/process.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/random.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/range.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/rational.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/re.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/ruby.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/select.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/signal.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/string.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/struct.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/thread.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/time.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/variable.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/vm.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/interpreter.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/iterator.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/memory.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/method.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/module.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/newobj.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/rgengc.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/scan_args.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/special_consts.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/static_assert.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/stdalign.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/stdbool.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/symbol.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/value.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/value_type.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/variable.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/warning_push.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/xmalloc.h
+to_ary_concat.o: $(hdrdir)/ruby/missing.h
+to_ary_concat.o: $(hdrdir)/ruby/ruby.h
+to_ary_concat.o: $(hdrdir)/ruby/st.h
+to_ary_concat.o: $(hdrdir)/ruby/subst.h
+to_ary_concat.o: to_ary_concat.c
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/array/concat/to_ary_conact.c b/ext/-test-/array/concat/to_ary_concat.c
index ec1fd321ce9..07a96d39072 100644
--- a/ext/-test-/array/concat/to_ary_conact.c
+++ b/ext/-test-/array/concat/to_ary_concat.c
@@ -17,7 +17,9 @@ Bar_alloc(VALUE klass)
return TypedData_Wrap_Struct(klass, &Bar_type, NULL);
}
-VALUE Bar_to_ary(VALUE _self) {
+static VALUE
+Bar_to_ary(VALUE _self)
+{
VALUE ary = rb_ary_new2(2);
VALUE foo = rb_ary_new2(0);
rb_ary_push(ary, foo);
@@ -26,7 +28,9 @@ VALUE Bar_to_ary(VALUE _self) {
return ary;
}
-void Init_to_ary_concat() {
+void
+Init_to_ary_concat(void)
+{
VALUE mBug = rb_define_module("Bug");
VALUE bar = rb_define_class_under(mBug, "Bar", rb_cObject);
rb_define_alloc_func(bar, Bar_alloc);
diff --git a/ext/-test-/array/resize/depend b/ext/-test-/array/resize/depend
index cf0c2320ae8..bd0b1bf280c 100644
--- a/ext/-test-/array/resize/depend
+++ b/ext/-test-/array/resize/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
resize.o: $(RUBY_EXTCONF_H)
resize.o: $(arch_hdrdir)/ruby/config.h
+resize.o: $(hdrdir)/ruby/assert.h
+resize.o: $(hdrdir)/ruby/backward.h
+resize.o: $(hdrdir)/ruby/backward/2/assume.h
+resize.o: $(hdrdir)/ruby/backward/2/attributes.h
+resize.o: $(hdrdir)/ruby/backward/2/bool.h
+resize.o: $(hdrdir)/ruby/backward/2/inttypes.h
+resize.o: $(hdrdir)/ruby/backward/2/limits.h
+resize.o: $(hdrdir)/ruby/backward/2/long_long.h
+resize.o: $(hdrdir)/ruby/backward/2/stdalign.h
+resize.o: $(hdrdir)/ruby/backward/2/stdarg.h
+resize.o: $(hdrdir)/ruby/defines.h
+resize.o: $(hdrdir)/ruby/intern.h
resize.o: $(hdrdir)/ruby/internal/anyargs.h
resize.o: $(hdrdir)/ruby/internal/arithmetic.h
resize.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ resize.o: $(hdrdir)/ruby/internal/value_type.h
resize.o: $(hdrdir)/ruby/internal/variable.h
resize.o: $(hdrdir)/ruby/internal/warning_push.h
resize.o: $(hdrdir)/ruby/internal/xmalloc.h
-resize.o: $(hdrdir)/ruby/assert.h
-resize.o: $(hdrdir)/ruby/backward.h
-resize.o: $(hdrdir)/ruby/backward/2/assume.h
-resize.o: $(hdrdir)/ruby/backward/2/attributes.h
-resize.o: $(hdrdir)/ruby/backward/2/bool.h
-resize.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-resize.o: $(hdrdir)/ruby/backward/2/inttypes.h
-resize.o: $(hdrdir)/ruby/backward/2/limits.h
-resize.o: $(hdrdir)/ruby/backward/2/long_long.h
-resize.o: $(hdrdir)/ruby/backward/2/stdalign.h
-resize.o: $(hdrdir)/ruby/backward/2/stdarg.h
-resize.o: $(hdrdir)/ruby/defines.h
-resize.o: $(hdrdir)/ruby/intern.h
resize.o: $(hdrdir)/ruby/missing.h
resize.o: $(hdrdir)/ruby/ruby.h
resize.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/bignum/depend b/ext/-test-/bignum/depend
index ddc1e63570d..28edc15f2b3 100644
--- a/ext/-test-/bignum/depend
+++ b/ext/-test-/bignum/depend
@@ -1,7 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
big2str.o: $(RUBY_EXTCONF_H)
big2str.o: $(arch_hdrdir)/ruby/config.h
-big2str.o: $(hdrdir)/ruby.h
+big2str.o: $(hdrdir)/ruby/assert.h
+big2str.o: $(hdrdir)/ruby/backward.h
+big2str.o: $(hdrdir)/ruby/backward/2/assume.h
+big2str.o: $(hdrdir)/ruby/backward/2/attributes.h
+big2str.o: $(hdrdir)/ruby/backward/2/bool.h
+big2str.o: $(hdrdir)/ruby/backward/2/inttypes.h
+big2str.o: $(hdrdir)/ruby/backward/2/limits.h
+big2str.o: $(hdrdir)/ruby/backward/2/long_long.h
+big2str.o: $(hdrdir)/ruby/backward/2/stdalign.h
+big2str.o: $(hdrdir)/ruby/backward/2/stdarg.h
+big2str.o: $(hdrdir)/ruby/defines.h
+big2str.o: $(hdrdir)/ruby/intern.h
big2str.o: $(hdrdir)/ruby/internal/anyargs.h
big2str.o: $(hdrdir)/ruby/internal/arithmetic.h
big2str.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,29 +152,26 @@ big2str.o: $(hdrdir)/ruby/internal/value_type.h
big2str.o: $(hdrdir)/ruby/internal/variable.h
big2str.o: $(hdrdir)/ruby/internal/warning_push.h
big2str.o: $(hdrdir)/ruby/internal/xmalloc.h
-big2str.o: $(hdrdir)/ruby/assert.h
-big2str.o: $(hdrdir)/ruby/backward.h
-big2str.o: $(hdrdir)/ruby/backward/2/assume.h
-big2str.o: $(hdrdir)/ruby/backward/2/attributes.h
-big2str.o: $(hdrdir)/ruby/backward/2/bool.h
-big2str.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-big2str.o: $(hdrdir)/ruby/backward/2/inttypes.h
-big2str.o: $(hdrdir)/ruby/backward/2/limits.h
-big2str.o: $(hdrdir)/ruby/backward/2/long_long.h
-big2str.o: $(hdrdir)/ruby/backward/2/stdalign.h
-big2str.o: $(hdrdir)/ruby/backward/2/stdarg.h
-big2str.o: $(hdrdir)/ruby/defines.h
-big2str.o: $(hdrdir)/ruby/intern.h
big2str.o: $(hdrdir)/ruby/missing.h
big2str.o: $(hdrdir)/ruby/ruby.h
big2str.o: $(hdrdir)/ruby/st.h
big2str.o: $(hdrdir)/ruby/subst.h
-big2str.o: $(top_srcdir)/internal.h
big2str.o: $(top_srcdir)/internal/bignum.h
big2str.o: big2str.c
bigzero.o: $(RUBY_EXTCONF_H)
bigzero.o: $(arch_hdrdir)/ruby/config.h
-bigzero.o: $(hdrdir)/ruby.h
+bigzero.o: $(hdrdir)/ruby/assert.h
+bigzero.o: $(hdrdir)/ruby/backward.h
+bigzero.o: $(hdrdir)/ruby/backward/2/assume.h
+bigzero.o: $(hdrdir)/ruby/backward/2/attributes.h
+bigzero.o: $(hdrdir)/ruby/backward/2/bool.h
+bigzero.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bigzero.o: $(hdrdir)/ruby/backward/2/limits.h
+bigzero.o: $(hdrdir)/ruby/backward/2/long_long.h
+bigzero.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bigzero.o: $(hdrdir)/ruby/backward/2/stdarg.h
+bigzero.o: $(hdrdir)/ruby/defines.h
+bigzero.o: $(hdrdir)/ruby/intern.h
bigzero.o: $(hdrdir)/ruby/internal/anyargs.h
bigzero.o: $(hdrdir)/ruby/internal/arithmetic.h
bigzero.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -303,29 +311,26 @@ bigzero.o: $(hdrdir)/ruby/internal/value_type.h
bigzero.o: $(hdrdir)/ruby/internal/variable.h
bigzero.o: $(hdrdir)/ruby/internal/warning_push.h
bigzero.o: $(hdrdir)/ruby/internal/xmalloc.h
-bigzero.o: $(hdrdir)/ruby/assert.h
-bigzero.o: $(hdrdir)/ruby/backward.h
-bigzero.o: $(hdrdir)/ruby/backward/2/assume.h
-bigzero.o: $(hdrdir)/ruby/backward/2/attributes.h
-bigzero.o: $(hdrdir)/ruby/backward/2/bool.h
-bigzero.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-bigzero.o: $(hdrdir)/ruby/backward/2/inttypes.h
-bigzero.o: $(hdrdir)/ruby/backward/2/limits.h
-bigzero.o: $(hdrdir)/ruby/backward/2/long_long.h
-bigzero.o: $(hdrdir)/ruby/backward/2/stdalign.h
-bigzero.o: $(hdrdir)/ruby/backward/2/stdarg.h
-bigzero.o: $(hdrdir)/ruby/defines.h
-bigzero.o: $(hdrdir)/ruby/intern.h
bigzero.o: $(hdrdir)/ruby/missing.h
bigzero.o: $(hdrdir)/ruby/ruby.h
bigzero.o: $(hdrdir)/ruby/st.h
bigzero.o: $(hdrdir)/ruby/subst.h
-bigzero.o: $(top_srcdir)/internal.h
bigzero.o: $(top_srcdir)/internal/bignum.h
bigzero.o: bigzero.c
div.o: $(RUBY_EXTCONF_H)
div.o: $(arch_hdrdir)/ruby/config.h
-div.o: $(hdrdir)/ruby.h
+div.o: $(hdrdir)/ruby/assert.h
+div.o: $(hdrdir)/ruby/backward.h
+div.o: $(hdrdir)/ruby/backward/2/assume.h
+div.o: $(hdrdir)/ruby/backward/2/attributes.h
+div.o: $(hdrdir)/ruby/backward/2/bool.h
+div.o: $(hdrdir)/ruby/backward/2/inttypes.h
+div.o: $(hdrdir)/ruby/backward/2/limits.h
+div.o: $(hdrdir)/ruby/backward/2/long_long.h
+div.o: $(hdrdir)/ruby/backward/2/stdalign.h
+div.o: $(hdrdir)/ruby/backward/2/stdarg.h
+div.o: $(hdrdir)/ruby/defines.h
+div.o: $(hdrdir)/ruby/intern.h
div.o: $(hdrdir)/ruby/internal/anyargs.h
div.o: $(hdrdir)/ruby/internal/arithmetic.h
div.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -465,29 +470,27 @@ div.o: $(hdrdir)/ruby/internal/value_type.h
div.o: $(hdrdir)/ruby/internal/variable.h
div.o: $(hdrdir)/ruby/internal/warning_push.h
div.o: $(hdrdir)/ruby/internal/xmalloc.h
-div.o: $(hdrdir)/ruby/assert.h
-div.o: $(hdrdir)/ruby/backward.h
-div.o: $(hdrdir)/ruby/backward/2/assume.h
-div.o: $(hdrdir)/ruby/backward/2/attributes.h
-div.o: $(hdrdir)/ruby/backward/2/bool.h
-div.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-div.o: $(hdrdir)/ruby/backward/2/inttypes.h
-div.o: $(hdrdir)/ruby/backward/2/limits.h
-div.o: $(hdrdir)/ruby/backward/2/long_long.h
-div.o: $(hdrdir)/ruby/backward/2/stdalign.h
-div.o: $(hdrdir)/ruby/backward/2/stdarg.h
-div.o: $(hdrdir)/ruby/defines.h
-div.o: $(hdrdir)/ruby/intern.h
div.o: $(hdrdir)/ruby/missing.h
div.o: $(hdrdir)/ruby/ruby.h
div.o: $(hdrdir)/ruby/st.h
div.o: $(hdrdir)/ruby/subst.h
-div.o: $(top_srcdir)/internal.h
div.o: $(top_srcdir)/internal/bignum.h
div.o: div.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -627,19 +630,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -647,7 +637,18 @@ init.o: $(hdrdir)/ruby/subst.h
init.o: init.c
intpack.o: $(RUBY_EXTCONF_H)
intpack.o: $(arch_hdrdir)/ruby/config.h
-intpack.o: $(hdrdir)/ruby.h
+intpack.o: $(hdrdir)/ruby/assert.h
+intpack.o: $(hdrdir)/ruby/backward.h
+intpack.o: $(hdrdir)/ruby/backward/2/assume.h
+intpack.o: $(hdrdir)/ruby/backward/2/attributes.h
+intpack.o: $(hdrdir)/ruby/backward/2/bool.h
+intpack.o: $(hdrdir)/ruby/backward/2/inttypes.h
+intpack.o: $(hdrdir)/ruby/backward/2/limits.h
+intpack.o: $(hdrdir)/ruby/backward/2/long_long.h
+intpack.o: $(hdrdir)/ruby/backward/2/stdalign.h
+intpack.o: $(hdrdir)/ruby/backward/2/stdarg.h
+intpack.o: $(hdrdir)/ruby/defines.h
+intpack.o: $(hdrdir)/ruby/intern.h
intpack.o: $(hdrdir)/ruby/internal/anyargs.h
intpack.o: $(hdrdir)/ruby/internal/arithmetic.h
intpack.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -787,29 +788,26 @@ intpack.o: $(hdrdir)/ruby/internal/value_type.h
intpack.o: $(hdrdir)/ruby/internal/variable.h
intpack.o: $(hdrdir)/ruby/internal/warning_push.h
intpack.o: $(hdrdir)/ruby/internal/xmalloc.h
-intpack.o: $(hdrdir)/ruby/assert.h
-intpack.o: $(hdrdir)/ruby/backward.h
-intpack.o: $(hdrdir)/ruby/backward/2/assume.h
-intpack.o: $(hdrdir)/ruby/backward/2/attributes.h
-intpack.o: $(hdrdir)/ruby/backward/2/bool.h
-intpack.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-intpack.o: $(hdrdir)/ruby/backward/2/inttypes.h
-intpack.o: $(hdrdir)/ruby/backward/2/limits.h
-intpack.o: $(hdrdir)/ruby/backward/2/long_long.h
-intpack.o: $(hdrdir)/ruby/backward/2/stdalign.h
-intpack.o: $(hdrdir)/ruby/backward/2/stdarg.h
-intpack.o: $(hdrdir)/ruby/defines.h
-intpack.o: $(hdrdir)/ruby/intern.h
intpack.o: $(hdrdir)/ruby/missing.h
intpack.o: $(hdrdir)/ruby/ruby.h
intpack.o: $(hdrdir)/ruby/st.h
intpack.o: $(hdrdir)/ruby/subst.h
-intpack.o: $(top_srcdir)/internal.h
intpack.o: $(top_srcdir)/internal/bignum.h
intpack.o: intpack.c
mul.o: $(RUBY_EXTCONF_H)
mul.o: $(arch_hdrdir)/ruby/config.h
-mul.o: $(hdrdir)/ruby.h
+mul.o: $(hdrdir)/ruby/assert.h
+mul.o: $(hdrdir)/ruby/backward.h
+mul.o: $(hdrdir)/ruby/backward/2/assume.h
+mul.o: $(hdrdir)/ruby/backward/2/attributes.h
+mul.o: $(hdrdir)/ruby/backward/2/bool.h
+mul.o: $(hdrdir)/ruby/backward/2/inttypes.h
+mul.o: $(hdrdir)/ruby/backward/2/limits.h
+mul.o: $(hdrdir)/ruby/backward/2/long_long.h
+mul.o: $(hdrdir)/ruby/backward/2/stdalign.h
+mul.o: $(hdrdir)/ruby/backward/2/stdarg.h
+mul.o: $(hdrdir)/ruby/defines.h
+mul.o: $(hdrdir)/ruby/intern.h
mul.o: $(hdrdir)/ruby/internal/anyargs.h
mul.o: $(hdrdir)/ruby/internal/arithmetic.h
mul.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -949,29 +947,26 @@ mul.o: $(hdrdir)/ruby/internal/value_type.h
mul.o: $(hdrdir)/ruby/internal/variable.h
mul.o: $(hdrdir)/ruby/internal/warning_push.h
mul.o: $(hdrdir)/ruby/internal/xmalloc.h
-mul.o: $(hdrdir)/ruby/assert.h
-mul.o: $(hdrdir)/ruby/backward.h
-mul.o: $(hdrdir)/ruby/backward/2/assume.h
-mul.o: $(hdrdir)/ruby/backward/2/attributes.h
-mul.o: $(hdrdir)/ruby/backward/2/bool.h
-mul.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-mul.o: $(hdrdir)/ruby/backward/2/inttypes.h
-mul.o: $(hdrdir)/ruby/backward/2/limits.h
-mul.o: $(hdrdir)/ruby/backward/2/long_long.h
-mul.o: $(hdrdir)/ruby/backward/2/stdalign.h
-mul.o: $(hdrdir)/ruby/backward/2/stdarg.h
-mul.o: $(hdrdir)/ruby/defines.h
-mul.o: $(hdrdir)/ruby/intern.h
mul.o: $(hdrdir)/ruby/missing.h
mul.o: $(hdrdir)/ruby/ruby.h
mul.o: $(hdrdir)/ruby/st.h
mul.o: $(hdrdir)/ruby/subst.h
-mul.o: $(top_srcdir)/internal.h
mul.o: $(top_srcdir)/internal/bignum.h
mul.o: mul.c
str2big.o: $(RUBY_EXTCONF_H)
str2big.o: $(arch_hdrdir)/ruby/config.h
-str2big.o: $(hdrdir)/ruby.h
+str2big.o: $(hdrdir)/ruby/assert.h
+str2big.o: $(hdrdir)/ruby/backward.h
+str2big.o: $(hdrdir)/ruby/backward/2/assume.h
+str2big.o: $(hdrdir)/ruby/backward/2/attributes.h
+str2big.o: $(hdrdir)/ruby/backward/2/bool.h
+str2big.o: $(hdrdir)/ruby/backward/2/inttypes.h
+str2big.o: $(hdrdir)/ruby/backward/2/limits.h
+str2big.o: $(hdrdir)/ruby/backward/2/long_long.h
+str2big.o: $(hdrdir)/ruby/backward/2/stdalign.h
+str2big.o: $(hdrdir)/ruby/backward/2/stdarg.h
+str2big.o: $(hdrdir)/ruby/defines.h
+str2big.o: $(hdrdir)/ruby/intern.h
str2big.o: $(hdrdir)/ruby/internal/anyargs.h
str2big.o: $(hdrdir)/ruby/internal/arithmetic.h
str2big.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -1111,24 +1106,10 @@ str2big.o: $(hdrdir)/ruby/internal/value_type.h
str2big.o: $(hdrdir)/ruby/internal/variable.h
str2big.o: $(hdrdir)/ruby/internal/warning_push.h
str2big.o: $(hdrdir)/ruby/internal/xmalloc.h
-str2big.o: $(hdrdir)/ruby/assert.h
-str2big.o: $(hdrdir)/ruby/backward.h
-str2big.o: $(hdrdir)/ruby/backward/2/assume.h
-str2big.o: $(hdrdir)/ruby/backward/2/attributes.h
-str2big.o: $(hdrdir)/ruby/backward/2/bool.h
-str2big.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-str2big.o: $(hdrdir)/ruby/backward/2/inttypes.h
-str2big.o: $(hdrdir)/ruby/backward/2/limits.h
-str2big.o: $(hdrdir)/ruby/backward/2/long_long.h
-str2big.o: $(hdrdir)/ruby/backward/2/stdalign.h
-str2big.o: $(hdrdir)/ruby/backward/2/stdarg.h
-str2big.o: $(hdrdir)/ruby/defines.h
-str2big.o: $(hdrdir)/ruby/intern.h
str2big.o: $(hdrdir)/ruby/missing.h
str2big.o: $(hdrdir)/ruby/ruby.h
str2big.o: $(hdrdir)/ruby/st.h
str2big.o: $(hdrdir)/ruby/subst.h
-str2big.o: $(top_srcdir)/internal.h
str2big.o: $(top_srcdir)/internal/bignum.h
str2big.o: str2big.c
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/bug-14834/depend b/ext/-test-/bug-14834/depend
index 5bbaf170897..0867139906d 100644
--- a/ext/-test-/bug-14834/depend
+++ b/ext/-test-/bug-14834/depend
@@ -1,6 +1,19 @@
# AUTOGENERATED DEPENDENCIES START
bug-14384.o: $(RUBY_EXTCONF_H)
bug-14384.o: $(arch_hdrdir)/ruby/config.h
+bug-14384.o: $(hdrdir)/ruby/assert.h
+bug-14384.o: $(hdrdir)/ruby/backward.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/assume.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/attributes.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/bool.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/limits.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/long_long.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/stdarg.h
+bug-14384.o: $(hdrdir)/ruby/debug.h
+bug-14384.o: $(hdrdir)/ruby/defines.h
+bug-14384.o: $(hdrdir)/ruby/intern.h
bug-14384.o: $(hdrdir)/ruby/internal/anyargs.h
bug-14384.o: $(hdrdir)/ruby/internal/arithmetic.h
bug-14384.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,20 +153,6 @@ bug-14384.o: $(hdrdir)/ruby/internal/value_type.h
bug-14384.o: $(hdrdir)/ruby/internal/variable.h
bug-14384.o: $(hdrdir)/ruby/internal/warning_push.h
bug-14384.o: $(hdrdir)/ruby/internal/xmalloc.h
-bug-14384.o: $(hdrdir)/ruby/assert.h
-bug-14384.o: $(hdrdir)/ruby/backward.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/assume.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/attributes.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/bool.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/inttypes.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/limits.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/long_long.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/stdalign.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/stdarg.h
-bug-14384.o: $(hdrdir)/ruby/debug.h
-bug-14384.o: $(hdrdir)/ruby/defines.h
-bug-14384.o: $(hdrdir)/ruby/intern.h
bug-14384.o: $(hdrdir)/ruby/missing.h
bug-14384.o: $(hdrdir)/ruby/ruby.h
bug-14384.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/bug-3571/depend b/ext/-test-/bug-3571/depend
index 506795a137d..73d1fec4351 100644
--- a/ext/-test-/bug-3571/depend
+++ b/ext/-test-/bug-3571/depend
@@ -2,6 +2,18 @@
bug.o: $(RUBY_EXTCONF_H)
bug.o: $(arch_hdrdir)/ruby/config.h
bug.o: $(hdrdir)/ruby.h
+bug.o: $(hdrdir)/ruby/assert.h
+bug.o: $(hdrdir)/ruby/backward.h
+bug.o: $(hdrdir)/ruby/backward/2/assume.h
+bug.o: $(hdrdir)/ruby/backward/2/attributes.h
+bug.o: $(hdrdir)/ruby/backward/2/bool.h
+bug.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bug.o: $(hdrdir)/ruby/backward/2/limits.h
+bug.o: $(hdrdir)/ruby/backward/2/long_long.h
+bug.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bug.o: $(hdrdir)/ruby/backward/2/stdarg.h
+bug.o: $(hdrdir)/ruby/defines.h
+bug.o: $(hdrdir)/ruby/intern.h
bug.o: $(hdrdir)/ruby/internal/anyargs.h
bug.o: $(hdrdir)/ruby/internal/arithmetic.h
bug.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ bug.o: $(hdrdir)/ruby/internal/value_type.h
bug.o: $(hdrdir)/ruby/internal/variable.h
bug.o: $(hdrdir)/ruby/internal/warning_push.h
bug.o: $(hdrdir)/ruby/internal/xmalloc.h
-bug.o: $(hdrdir)/ruby/assert.h
-bug.o: $(hdrdir)/ruby/backward.h
-bug.o: $(hdrdir)/ruby/backward/2/assume.h
-bug.o: $(hdrdir)/ruby/backward/2/attributes.h
-bug.o: $(hdrdir)/ruby/backward/2/bool.h
-bug.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-bug.o: $(hdrdir)/ruby/backward/2/inttypes.h
-bug.o: $(hdrdir)/ruby/backward/2/limits.h
-bug.o: $(hdrdir)/ruby/backward/2/long_long.h
-bug.o: $(hdrdir)/ruby/backward/2/stdalign.h
-bug.o: $(hdrdir)/ruby/backward/2/stdarg.h
-bug.o: $(hdrdir)/ruby/defines.h
-bug.o: $(hdrdir)/ruby/intern.h
bug.o: $(hdrdir)/ruby/missing.h
bug.o: $(hdrdir)/ruby/ruby.h
bug.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/bug-5832/depend b/ext/-test-/bug-5832/depend
index 506795a137d..73d1fec4351 100644
--- a/ext/-test-/bug-5832/depend
+++ b/ext/-test-/bug-5832/depend
@@ -2,6 +2,18 @@
bug.o: $(RUBY_EXTCONF_H)
bug.o: $(arch_hdrdir)/ruby/config.h
bug.o: $(hdrdir)/ruby.h
+bug.o: $(hdrdir)/ruby/assert.h
+bug.o: $(hdrdir)/ruby/backward.h
+bug.o: $(hdrdir)/ruby/backward/2/assume.h
+bug.o: $(hdrdir)/ruby/backward/2/attributes.h
+bug.o: $(hdrdir)/ruby/backward/2/bool.h
+bug.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bug.o: $(hdrdir)/ruby/backward/2/limits.h
+bug.o: $(hdrdir)/ruby/backward/2/long_long.h
+bug.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bug.o: $(hdrdir)/ruby/backward/2/stdarg.h
+bug.o: $(hdrdir)/ruby/defines.h
+bug.o: $(hdrdir)/ruby/intern.h
bug.o: $(hdrdir)/ruby/internal/anyargs.h
bug.o: $(hdrdir)/ruby/internal/arithmetic.h
bug.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ bug.o: $(hdrdir)/ruby/internal/value_type.h
bug.o: $(hdrdir)/ruby/internal/variable.h
bug.o: $(hdrdir)/ruby/internal/warning_push.h
bug.o: $(hdrdir)/ruby/internal/xmalloc.h
-bug.o: $(hdrdir)/ruby/assert.h
-bug.o: $(hdrdir)/ruby/backward.h
-bug.o: $(hdrdir)/ruby/backward/2/assume.h
-bug.o: $(hdrdir)/ruby/backward/2/attributes.h
-bug.o: $(hdrdir)/ruby/backward/2/bool.h
-bug.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-bug.o: $(hdrdir)/ruby/backward/2/inttypes.h
-bug.o: $(hdrdir)/ruby/backward/2/limits.h
-bug.o: $(hdrdir)/ruby/backward/2/long_long.h
-bug.o: $(hdrdir)/ruby/backward/2/stdalign.h
-bug.o: $(hdrdir)/ruby/backward/2/stdarg.h
-bug.o: $(hdrdir)/ruby/defines.h
-bug.o: $(hdrdir)/ruby/intern.h
bug.o: $(hdrdir)/ruby/missing.h
bug.o: $(hdrdir)/ruby/ruby.h
bug.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/bug_reporter/depend b/ext/-test-/bug_reporter/depend
index 0eadef5d820..d36d0fb6c25 100644
--- a/ext/-test-/bug_reporter/depend
+++ b/ext/-test-/bug_reporter/depend
@@ -2,6 +2,18 @@
bug_reporter.o: $(RUBY_EXTCONF_H)
bug_reporter.o: $(arch_hdrdir)/ruby/config.h
bug_reporter.o: $(hdrdir)/ruby.h
+bug_reporter.o: $(hdrdir)/ruby/assert.h
+bug_reporter.o: $(hdrdir)/ruby/backward.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/assume.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/attributes.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/bool.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/limits.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/long_long.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/stdarg.h
+bug_reporter.o: $(hdrdir)/ruby/defines.h
+bug_reporter.o: $(hdrdir)/ruby/intern.h
bug_reporter.o: $(hdrdir)/ruby/internal/anyargs.h
bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic.h
bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ bug_reporter.o: $(hdrdir)/ruby/internal/value_type.h
bug_reporter.o: $(hdrdir)/ruby/internal/variable.h
bug_reporter.o: $(hdrdir)/ruby/internal/warning_push.h
bug_reporter.o: $(hdrdir)/ruby/internal/xmalloc.h
-bug_reporter.o: $(hdrdir)/ruby/assert.h
-bug_reporter.o: $(hdrdir)/ruby/backward.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/assume.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/attributes.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/bool.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/inttypes.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/limits.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/long_long.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/stdalign.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/stdarg.h
-bug_reporter.o: $(hdrdir)/ruby/defines.h
-bug_reporter.o: $(hdrdir)/ruby/intern.h
bug_reporter.o: $(hdrdir)/ruby/missing.h
bug_reporter.o: $(hdrdir)/ruby/ruby.h
bug_reporter.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/class/depend b/ext/-test-/class/depend
index 69138c6175b..bb74e1f24d0 100644
--- a/ext/-test-/class/depend
+++ b/ext/-test-/class/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
class2name.o: $(RUBY_EXTCONF_H)
class2name.o: $(arch_hdrdir)/ruby/config.h
+class2name.o: $(hdrdir)/ruby/assert.h
+class2name.o: $(hdrdir)/ruby/backward.h
+class2name.o: $(hdrdir)/ruby/backward/2/assume.h
+class2name.o: $(hdrdir)/ruby/backward/2/attributes.h
+class2name.o: $(hdrdir)/ruby/backward/2/bool.h
+class2name.o: $(hdrdir)/ruby/backward/2/inttypes.h
+class2name.o: $(hdrdir)/ruby/backward/2/limits.h
+class2name.o: $(hdrdir)/ruby/backward/2/long_long.h
+class2name.o: $(hdrdir)/ruby/backward/2/stdalign.h
+class2name.o: $(hdrdir)/ruby/backward/2/stdarg.h
+class2name.o: $(hdrdir)/ruby/defines.h
+class2name.o: $(hdrdir)/ruby/intern.h
class2name.o: $(hdrdir)/ruby/internal/anyargs.h
class2name.o: $(hdrdir)/ruby/internal/arithmetic.h
class2name.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ class2name.o: $(hdrdir)/ruby/internal/value_type.h
class2name.o: $(hdrdir)/ruby/internal/variable.h
class2name.o: $(hdrdir)/ruby/internal/warning_push.h
class2name.o: $(hdrdir)/ruby/internal/xmalloc.h
-class2name.o: $(hdrdir)/ruby/assert.h
-class2name.o: $(hdrdir)/ruby/backward.h
-class2name.o: $(hdrdir)/ruby/backward/2/assume.h
-class2name.o: $(hdrdir)/ruby/backward/2/attributes.h
-class2name.o: $(hdrdir)/ruby/backward/2/bool.h
-class2name.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-class2name.o: $(hdrdir)/ruby/backward/2/inttypes.h
-class2name.o: $(hdrdir)/ruby/backward/2/limits.h
-class2name.o: $(hdrdir)/ruby/backward/2/long_long.h
-class2name.o: $(hdrdir)/ruby/backward/2/stdalign.h
-class2name.o: $(hdrdir)/ruby/backward/2/stdarg.h
-class2name.o: $(hdrdir)/ruby/defines.h
-class2name.o: $(hdrdir)/ruby/intern.h
class2name.o: $(hdrdir)/ruby/missing.h
class2name.o: $(hdrdir)/ruby/ruby.h
class2name.o: $(hdrdir)/ruby/st.h
@@ -161,6 +160,18 @@ class2name.o: class2name.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -300,19 +311,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/cxxanyargs/depend b/ext/-test-/cxxanyargs/depend
index ca821409a2b..fc3d8e45d9e 100644
--- a/ext/-test-/cxxanyargs/depend
+++ b/ext/-test-/cxxanyargs/depend
@@ -10,16 +10,4 @@ $(TARGET_SO) $(STATIC_LIB): $(FAILURES:.cpp=.failed)
-e "File.write(t, err)" $@ $(MAKE) $(*F).o
# AUTOGENERATED DEPENDENCIES START
-cxxanyargs.o: $(RUBY_EXTCONF_H)
-cxxanyargs.o: $(arch_hdrdir)/ruby/config.h
-cxxanyargs.o: $(hdrdir)/ruby/assert.h
-cxxanyargs.o: $(hdrdir)/ruby/backward.h
-cxxanyargs.o: $(hdrdir)/ruby/backward/cxxanyargs.hpp
-cxxanyargs.o: $(hdrdir)/ruby/defines.h
-cxxanyargs.o: $(hdrdir)/ruby/intern.h
-cxxanyargs.o: $(hdrdir)/ruby/missing.h
-cxxanyargs.o: $(hdrdir)/ruby/ruby.h
-cxxanyargs.o: $(hdrdir)/ruby/st.h
-cxxanyargs.o: $(hdrdir)/ruby/subst.h
-cxxanyargs.o: cxxanyargs.cpp
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/debug/depend b/ext/-test-/debug/depend
index 6c1c736d61c..20f7be675b4 100644
--- a/ext/-test-/debug/depend
+++ b/ext/-test-/debug/depend
@@ -2,6 +2,18 @@
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -161,6 +160,19 @@ init.o: $(hdrdir)/ruby/subst.h
init.o: init.c
inspector.o: $(RUBY_EXTCONF_H)
inspector.o: $(arch_hdrdir)/ruby/config.h
+inspector.o: $(hdrdir)/ruby/assert.h
+inspector.o: $(hdrdir)/ruby/backward.h
+inspector.o: $(hdrdir)/ruby/backward/2/assume.h
+inspector.o: $(hdrdir)/ruby/backward/2/attributes.h
+inspector.o: $(hdrdir)/ruby/backward/2/bool.h
+inspector.o: $(hdrdir)/ruby/backward/2/inttypes.h
+inspector.o: $(hdrdir)/ruby/backward/2/limits.h
+inspector.o: $(hdrdir)/ruby/backward/2/long_long.h
+inspector.o: $(hdrdir)/ruby/backward/2/stdalign.h
+inspector.o: $(hdrdir)/ruby/backward/2/stdarg.h
+inspector.o: $(hdrdir)/ruby/debug.h
+inspector.o: $(hdrdir)/ruby/defines.h
+inspector.o: $(hdrdir)/ruby/intern.h
inspector.o: $(hdrdir)/ruby/internal/anyargs.h
inspector.o: $(hdrdir)/ruby/internal/arithmetic.h
inspector.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -300,20 +312,6 @@ inspector.o: $(hdrdir)/ruby/internal/value_type.h
inspector.o: $(hdrdir)/ruby/internal/variable.h
inspector.o: $(hdrdir)/ruby/internal/warning_push.h
inspector.o: $(hdrdir)/ruby/internal/xmalloc.h
-inspector.o: $(hdrdir)/ruby/assert.h
-inspector.o: $(hdrdir)/ruby/backward.h
-inspector.o: $(hdrdir)/ruby/backward/2/assume.h
-inspector.o: $(hdrdir)/ruby/backward/2/attributes.h
-inspector.o: $(hdrdir)/ruby/backward/2/bool.h
-inspector.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-inspector.o: $(hdrdir)/ruby/backward/2/inttypes.h
-inspector.o: $(hdrdir)/ruby/backward/2/limits.h
-inspector.o: $(hdrdir)/ruby/backward/2/long_long.h
-inspector.o: $(hdrdir)/ruby/backward/2/stdalign.h
-inspector.o: $(hdrdir)/ruby/backward/2/stdarg.h
-inspector.o: $(hdrdir)/ruby/debug.h
-inspector.o: $(hdrdir)/ruby/defines.h
-inspector.o: $(hdrdir)/ruby/intern.h
inspector.o: $(hdrdir)/ruby/missing.h
inspector.o: $(hdrdir)/ruby/ruby.h
inspector.o: $(hdrdir)/ruby/st.h
@@ -321,6 +319,19 @@ inspector.o: $(hdrdir)/ruby/subst.h
inspector.o: inspector.c
profile_frames.o: $(RUBY_EXTCONF_H)
profile_frames.o: $(arch_hdrdir)/ruby/config.h
+profile_frames.o: $(hdrdir)/ruby/assert.h
+profile_frames.o: $(hdrdir)/ruby/backward.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/assume.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/attributes.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/bool.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/inttypes.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/limits.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/long_long.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/stdalign.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/stdarg.h
+profile_frames.o: $(hdrdir)/ruby/debug.h
+profile_frames.o: $(hdrdir)/ruby/defines.h
+profile_frames.o: $(hdrdir)/ruby/intern.h
profile_frames.o: $(hdrdir)/ruby/internal/anyargs.h
profile_frames.o: $(hdrdir)/ruby/internal/arithmetic.h
profile_frames.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -460,20 +471,6 @@ profile_frames.o: $(hdrdir)/ruby/internal/value_type.h
profile_frames.o: $(hdrdir)/ruby/internal/variable.h
profile_frames.o: $(hdrdir)/ruby/internal/warning_push.h
profile_frames.o: $(hdrdir)/ruby/internal/xmalloc.h
-profile_frames.o: $(hdrdir)/ruby/assert.h
-profile_frames.o: $(hdrdir)/ruby/backward.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/assume.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/attributes.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/bool.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/inttypes.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/limits.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/long_long.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/stdalign.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/stdarg.h
-profile_frames.o: $(hdrdir)/ruby/debug.h
-profile_frames.o: $(hdrdir)/ruby/defines.h
-profile_frames.o: $(hdrdir)/ruby/intern.h
profile_frames.o: $(hdrdir)/ruby/missing.h
profile_frames.o: $(hdrdir)/ruby/ruby.h
profile_frames.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/enumerator_kw/depend b/ext/-test-/enumerator_kw/depend
index 482863a2884..4347538d379 100644
--- a/ext/-test-/enumerator_kw/depend
+++ b/ext/-test-/enumerator_kw/depend
@@ -2,6 +2,18 @@
enumerator_kw.o: $(RUBY_EXTCONF_H)
enumerator_kw.o: $(arch_hdrdir)/ruby/config.h
enumerator_kw.o: $(hdrdir)/ruby.h
+enumerator_kw.o: $(hdrdir)/ruby/assert.h
+enumerator_kw.o: $(hdrdir)/ruby/backward.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/assume.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/attributes.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/bool.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/inttypes.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/limits.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/long_long.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/stdalign.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/stdarg.h
+enumerator_kw.o: $(hdrdir)/ruby/defines.h
+enumerator_kw.o: $(hdrdir)/ruby/intern.h
enumerator_kw.o: $(hdrdir)/ruby/internal/anyargs.h
enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic.h
enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ enumerator_kw.o: $(hdrdir)/ruby/internal/value_type.h
enumerator_kw.o: $(hdrdir)/ruby/internal/variable.h
enumerator_kw.o: $(hdrdir)/ruby/internal/warning_push.h
enumerator_kw.o: $(hdrdir)/ruby/internal/xmalloc.h
-enumerator_kw.o: $(hdrdir)/ruby/assert.h
-enumerator_kw.o: $(hdrdir)/ruby/backward.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/assume.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/attributes.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/bool.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/inttypes.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/limits.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/long_long.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/stdalign.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/stdarg.h
-enumerator_kw.o: $(hdrdir)/ruby/defines.h
-enumerator_kw.o: $(hdrdir)/ruby/intern.h
enumerator_kw.o: $(hdrdir)/ruby/missing.h
enumerator_kw.o: $(hdrdir)/ruby/ruby.h
enumerator_kw.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/exception/depend b/ext/-test-/exception/depend
index 8ecc512841d..05f6ff6552f 100644
--- a/ext/-test-/exception/depend
+++ b/ext/-test-/exception/depend
@@ -6,7 +6,6 @@ dataerror.o: $(hdrdir)/ruby/backward.h
dataerror.o: $(hdrdir)/ruby/backward/2/assume.h
dataerror.o: $(hdrdir)/ruby/backward/2/attributes.h
dataerror.o: $(hdrdir)/ruby/backward/2/bool.h
-dataerror.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
dataerror.o: $(hdrdir)/ruby/backward/2/inttypes.h
dataerror.o: $(hdrdir)/ruby/backward/2/limits.h
dataerror.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -166,7 +165,6 @@ enc_raise.o: $(hdrdir)/ruby/backward.h
enc_raise.o: $(hdrdir)/ruby/backward/2/assume.h
enc_raise.o: $(hdrdir)/ruby/backward/2/attributes.h
enc_raise.o: $(hdrdir)/ruby/backward/2/bool.h
-enc_raise.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
enc_raise.o: $(hdrdir)/ruby/backward/2/inttypes.h
enc_raise.o: $(hdrdir)/ruby/backward/2/limits.h
enc_raise.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -338,7 +336,6 @@ ensured.o: $(hdrdir)/ruby/backward.h
ensured.o: $(hdrdir)/ruby/backward/2/assume.h
ensured.o: $(hdrdir)/ruby/backward/2/attributes.h
ensured.o: $(hdrdir)/ruby/backward/2/bool.h
-ensured.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
ensured.o: $(hdrdir)/ruby/backward/2/inttypes.h
ensured.o: $(hdrdir)/ruby/backward/2/limits.h
ensured.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -498,7 +495,6 @@ init.o: $(hdrdir)/ruby/backward.h
init.o: $(hdrdir)/ruby/backward/2/assume.h
init.o: $(hdrdir)/ruby/backward/2/attributes.h
init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
init.o: $(hdrdir)/ruby/backward/2/inttypes.h
init.o: $(hdrdir)/ruby/backward/2/limits.h
init.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/-test-/fatal/depend b/ext/-test-/fatal/depend
index 79ac18fd9fb..ccb274e8f89 100644
--- a/ext/-test-/fatal/depend
+++ b/ext/-test-/fatal/depend
@@ -2,6 +2,18 @@
rb_fatal.o: $(RUBY_EXTCONF_H)
rb_fatal.o: $(arch_hdrdir)/ruby/config.h
rb_fatal.o: $(hdrdir)/ruby.h
+rb_fatal.o: $(hdrdir)/ruby/assert.h
+rb_fatal.o: $(hdrdir)/ruby/backward.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/assume.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/attributes.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/bool.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/inttypes.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/limits.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/long_long.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/stdalign.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/stdarg.h
+rb_fatal.o: $(hdrdir)/ruby/defines.h
+rb_fatal.o: $(hdrdir)/ruby/intern.h
rb_fatal.o: $(hdrdir)/ruby/internal/anyargs.h
rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic.h
rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ rb_fatal.o: $(hdrdir)/ruby/internal/value_type.h
rb_fatal.o: $(hdrdir)/ruby/internal/variable.h
rb_fatal.o: $(hdrdir)/ruby/internal/warning_push.h
rb_fatal.o: $(hdrdir)/ruby/internal/xmalloc.h
-rb_fatal.o: $(hdrdir)/ruby/assert.h
-rb_fatal.o: $(hdrdir)/ruby/backward.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/assume.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/attributes.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/bool.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/inttypes.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/limits.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/long_long.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/stdalign.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/stdarg.h
-rb_fatal.o: $(hdrdir)/ruby/defines.h
-rb_fatal.o: $(hdrdir)/ruby/intern.h
rb_fatal.o: $(hdrdir)/ruby/missing.h
rb_fatal.o: $(hdrdir)/ruby/ruby.h
rb_fatal.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/file/depend b/ext/-test-/file/depend
index 966cbdfd8ab..a6ac8bb55c0 100644
--- a/ext/-test-/file/depend
+++ b/ext/-test-/file/depend
@@ -6,7 +6,6 @@ fs.o: $(hdrdir)/ruby/backward.h
fs.o: $(hdrdir)/ruby/backward/2/assume.h
fs.o: $(hdrdir)/ruby/backward/2/attributes.h
fs.o: $(hdrdir)/ruby/backward/2/bool.h
-fs.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
fs.o: $(hdrdir)/ruby/backward/2/inttypes.h
fs.o: $(hdrdir)/ruby/backward/2/limits.h
fs.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -179,7 +178,6 @@ init.o: $(hdrdir)/ruby/backward.h
init.o: $(hdrdir)/ruby/backward/2/assume.h
init.o: $(hdrdir)/ruby/backward/2/attributes.h
init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
init.o: $(hdrdir)/ruby/backward/2/inttypes.h
init.o: $(hdrdir)/ruby/backward/2/limits.h
init.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -338,7 +336,6 @@ stat.o: $(hdrdir)/ruby/backward.h
stat.o: $(hdrdir)/ruby/backward/2/assume.h
stat.o: $(hdrdir)/ruby/backward/2/attributes.h
stat.o: $(hdrdir)/ruby/backward/2/bool.h
-stat.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
stat.o: $(hdrdir)/ruby/backward/2/inttypes.h
stat.o: $(hdrdir)/ruby/backward/2/limits.h
stat.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/-test-/file/fs.c b/ext/-test-/file/fs.c
index 63d2356d762..1a6c3d06dc1 100644
--- a/ext/-test-/file/fs.c
+++ b/ext/-test-/file/fs.c
@@ -28,7 +28,7 @@ typedef struct statvfs statfs_t;
# if defined HAVE_STRUCT_STATVFS_F_TYPE
# define HAVE_STRUCT_STATFS_T_F_TYPE 1
# endif
-#elif defined(HAVE_STRUCT_STATVFS_F_BASETYPE) /* AIX, HP-UX, Solaris */
+#elif defined(HAVE_STRUCT_STATVFS_F_BASETYPE) /* AIX, Solaris */
typedef struct statvfs statfs_t;
# define STATFS(f, s) statvfs((f), (s))
# define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1
diff --git a/ext/-test-/float/depend b/ext/-test-/float/depend
index 55b014e8a0c..661f4876d80 100644
--- a/ext/-test-/float/depend
+++ b/ext/-test-/float/depend
@@ -5,6 +5,18 @@ nextafter.o: nextafter.c $(top_srcdir)/missing/nextafter.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -144,19 +156,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -165,6 +164,18 @@ init.o: init.c
nextafter.o: $(RUBY_EXTCONF_H)
nextafter.o: $(arch_hdrdir)/ruby/config.h
nextafter.o: $(hdrdir)/ruby.h
+nextafter.o: $(hdrdir)/ruby/assert.h
+nextafter.o: $(hdrdir)/ruby/backward.h
+nextafter.o: $(hdrdir)/ruby/backward/2/assume.h
+nextafter.o: $(hdrdir)/ruby/backward/2/attributes.h
+nextafter.o: $(hdrdir)/ruby/backward/2/bool.h
+nextafter.o: $(hdrdir)/ruby/backward/2/inttypes.h
+nextafter.o: $(hdrdir)/ruby/backward/2/limits.h
+nextafter.o: $(hdrdir)/ruby/backward/2/long_long.h
+nextafter.o: $(hdrdir)/ruby/backward/2/stdalign.h
+nextafter.o: $(hdrdir)/ruby/backward/2/stdarg.h
+nextafter.o: $(hdrdir)/ruby/defines.h
+nextafter.o: $(hdrdir)/ruby/intern.h
nextafter.o: $(hdrdir)/ruby/internal/anyargs.h
nextafter.o: $(hdrdir)/ruby/internal/arithmetic.h
nextafter.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -304,19 +315,6 @@ nextafter.o: $(hdrdir)/ruby/internal/value_type.h
nextafter.o: $(hdrdir)/ruby/internal/variable.h
nextafter.o: $(hdrdir)/ruby/internal/warning_push.h
nextafter.o: $(hdrdir)/ruby/internal/xmalloc.h
-nextafter.o: $(hdrdir)/ruby/assert.h
-nextafter.o: $(hdrdir)/ruby/backward.h
-nextafter.o: $(hdrdir)/ruby/backward/2/assume.h
-nextafter.o: $(hdrdir)/ruby/backward/2/attributes.h
-nextafter.o: $(hdrdir)/ruby/backward/2/bool.h
-nextafter.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-nextafter.o: $(hdrdir)/ruby/backward/2/inttypes.h
-nextafter.o: $(hdrdir)/ruby/backward/2/limits.h
-nextafter.o: $(hdrdir)/ruby/backward/2/long_long.h
-nextafter.o: $(hdrdir)/ruby/backward/2/stdalign.h
-nextafter.o: $(hdrdir)/ruby/backward/2/stdarg.h
-nextafter.o: $(hdrdir)/ruby/defines.h
-nextafter.o: $(hdrdir)/ruby/intern.h
nextafter.o: $(hdrdir)/ruby/missing.h
nextafter.o: $(hdrdir)/ruby/ruby.h
nextafter.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/funcall/depend b/ext/-test-/funcall/depend
index 412ad522d5e..adec76f1448 100644
--- a/ext/-test-/funcall/depend
+++ b/ext/-test-/funcall/depend
@@ -2,6 +2,18 @@
funcall.o: $(RUBY_EXTCONF_H)
funcall.o: $(arch_hdrdir)/ruby/config.h
funcall.o: $(hdrdir)/ruby.h
+funcall.o: $(hdrdir)/ruby/assert.h
+funcall.o: $(hdrdir)/ruby/backward.h
+funcall.o: $(hdrdir)/ruby/backward/2/assume.h
+funcall.o: $(hdrdir)/ruby/backward/2/attributes.h
+funcall.o: $(hdrdir)/ruby/backward/2/bool.h
+funcall.o: $(hdrdir)/ruby/backward/2/inttypes.h
+funcall.o: $(hdrdir)/ruby/backward/2/limits.h
+funcall.o: $(hdrdir)/ruby/backward/2/long_long.h
+funcall.o: $(hdrdir)/ruby/backward/2/stdalign.h
+funcall.o: $(hdrdir)/ruby/backward/2/stdarg.h
+funcall.o: $(hdrdir)/ruby/defines.h
+funcall.o: $(hdrdir)/ruby/intern.h
funcall.o: $(hdrdir)/ruby/internal/anyargs.h
funcall.o: $(hdrdir)/ruby/internal/arithmetic.h
funcall.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ funcall.o: $(hdrdir)/ruby/internal/value_type.h
funcall.o: $(hdrdir)/ruby/internal/variable.h
funcall.o: $(hdrdir)/ruby/internal/warning_push.h
funcall.o: $(hdrdir)/ruby/internal/xmalloc.h
-funcall.o: $(hdrdir)/ruby/assert.h
-funcall.o: $(hdrdir)/ruby/backward.h
-funcall.o: $(hdrdir)/ruby/backward/2/assume.h
-funcall.o: $(hdrdir)/ruby/backward/2/attributes.h
-funcall.o: $(hdrdir)/ruby/backward/2/bool.h
-funcall.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-funcall.o: $(hdrdir)/ruby/backward/2/inttypes.h
-funcall.o: $(hdrdir)/ruby/backward/2/limits.h
-funcall.o: $(hdrdir)/ruby/backward/2/long_long.h
-funcall.o: $(hdrdir)/ruby/backward/2/stdalign.h
-funcall.o: $(hdrdir)/ruby/backward/2/stdarg.h
-funcall.o: $(hdrdir)/ruby/defines.h
-funcall.o: $(hdrdir)/ruby/intern.h
funcall.o: $(hdrdir)/ruby/missing.h
funcall.o: $(hdrdir)/ruby/ruby.h
funcall.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/gvl/call_without_gvl/depend b/ext/-test-/gvl/call_without_gvl/depend
index e6ecd43ef75..d74a525224f 100644
--- a/ext/-test-/gvl/call_without_gvl/depend
+++ b/ext/-test-/gvl/call_without_gvl/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
call_without_gvl.o: $(RUBY_EXTCONF_H)
call_without_gvl.o: $(arch_hdrdir)/ruby/config.h
+call_without_gvl.o: $(hdrdir)/ruby/assert.h
+call_without_gvl.o: $(hdrdir)/ruby/backward.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/assume.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/attributes.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/bool.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/inttypes.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/limits.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/long_long.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/stdalign.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/stdarg.h
+call_without_gvl.o: $(hdrdir)/ruby/defines.h
+call_without_gvl.o: $(hdrdir)/ruby/intern.h
call_without_gvl.o: $(hdrdir)/ruby/internal/anyargs.h
call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic.h
call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ call_without_gvl.o: $(hdrdir)/ruby/internal/value_type.h
call_without_gvl.o: $(hdrdir)/ruby/internal/variable.h
call_without_gvl.o: $(hdrdir)/ruby/internal/warning_push.h
call_without_gvl.o: $(hdrdir)/ruby/internal/xmalloc.h
-call_without_gvl.o: $(hdrdir)/ruby/assert.h
-call_without_gvl.o: $(hdrdir)/ruby/backward.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/assume.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/attributes.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/bool.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/inttypes.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/limits.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/long_long.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/stdalign.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/stdarg.h
-call_without_gvl.o: $(hdrdir)/ruby/defines.h
-call_without_gvl.o: $(hdrdir)/ruby/intern.h
call_without_gvl.o: $(hdrdir)/ruby/missing.h
call_without_gvl.o: $(hdrdir)/ruby/ruby.h
call_without_gvl.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/hash/depend b/ext/-test-/hash/depend
index fe52e9bb1ab..b8460734cec 100644
--- a/ext/-test-/hash/depend
+++ b/ext/-test-/hash/depend
@@ -2,6 +2,18 @@
delete.o: $(RUBY_EXTCONF_H)
delete.o: $(arch_hdrdir)/ruby/config.h
delete.o: $(hdrdir)/ruby.h
+delete.o: $(hdrdir)/ruby/assert.h
+delete.o: $(hdrdir)/ruby/backward.h
+delete.o: $(hdrdir)/ruby/backward/2/assume.h
+delete.o: $(hdrdir)/ruby/backward/2/attributes.h
+delete.o: $(hdrdir)/ruby/backward/2/bool.h
+delete.o: $(hdrdir)/ruby/backward/2/inttypes.h
+delete.o: $(hdrdir)/ruby/backward/2/limits.h
+delete.o: $(hdrdir)/ruby/backward/2/long_long.h
+delete.o: $(hdrdir)/ruby/backward/2/stdalign.h
+delete.o: $(hdrdir)/ruby/backward/2/stdarg.h
+delete.o: $(hdrdir)/ruby/defines.h
+delete.o: $(hdrdir)/ruby/intern.h
delete.o: $(hdrdir)/ruby/internal/anyargs.h
delete.o: $(hdrdir)/ruby/internal/arithmetic.h
delete.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ delete.o: $(hdrdir)/ruby/internal/value_type.h
delete.o: $(hdrdir)/ruby/internal/variable.h
delete.o: $(hdrdir)/ruby/internal/warning_push.h
delete.o: $(hdrdir)/ruby/internal/xmalloc.h
-delete.o: $(hdrdir)/ruby/assert.h
-delete.o: $(hdrdir)/ruby/backward.h
-delete.o: $(hdrdir)/ruby/backward/2/assume.h
-delete.o: $(hdrdir)/ruby/backward/2/attributes.h
-delete.o: $(hdrdir)/ruby/backward/2/bool.h
-delete.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-delete.o: $(hdrdir)/ruby/backward/2/inttypes.h
-delete.o: $(hdrdir)/ruby/backward/2/limits.h
-delete.o: $(hdrdir)/ruby/backward/2/long_long.h
-delete.o: $(hdrdir)/ruby/backward/2/stdalign.h
-delete.o: $(hdrdir)/ruby/backward/2/stdarg.h
-delete.o: $(hdrdir)/ruby/defines.h
-delete.o: $(hdrdir)/ruby/intern.h
delete.o: $(hdrdir)/ruby/missing.h
delete.o: $(hdrdir)/ruby/ruby.h
delete.o: $(hdrdir)/ruby/st.h
@@ -162,6 +161,18 @@ delete.o: delete.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -301,19 +312,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/integer/depend b/ext/-test-/integer/depend
index 825110658b8..522f6283ac8 100644
--- a/ext/-test-/integer/depend
+++ b/ext/-test-/integer/depend
@@ -1,7 +1,19 @@
# AUTOGENERATED DEPENDENCIES START
core_ext.o: $(RUBY_EXTCONF_H)
core_ext.o: $(arch_hdrdir)/ruby/config.h
-core_ext.o: $(hdrdir)/ruby.h
+core_ext.o: $(hdrdir)/ruby/assert.h
+core_ext.o: $(hdrdir)/ruby/backward.h
+core_ext.o: $(hdrdir)/ruby/backward/2/assume.h
+core_ext.o: $(hdrdir)/ruby/backward/2/attributes.h
+core_ext.o: $(hdrdir)/ruby/backward/2/bool.h
+core_ext.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+core_ext.o: $(hdrdir)/ruby/backward/2/inttypes.h
+core_ext.o: $(hdrdir)/ruby/backward/2/limits.h
+core_ext.o: $(hdrdir)/ruby/backward/2/long_long.h
+core_ext.o: $(hdrdir)/ruby/backward/2/stdalign.h
+core_ext.o: $(hdrdir)/ruby/backward/2/stdarg.h
+core_ext.o: $(hdrdir)/ruby/defines.h
+core_ext.o: $(hdrdir)/ruby/intern.h
core_ext.o: $(hdrdir)/ruby/internal/anyargs.h
core_ext.o: $(hdrdir)/ruby/internal/arithmetic.h
core_ext.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,24 +153,10 @@ core_ext.o: $(hdrdir)/ruby/internal/value_type.h
core_ext.o: $(hdrdir)/ruby/internal/variable.h
core_ext.o: $(hdrdir)/ruby/internal/warning_push.h
core_ext.o: $(hdrdir)/ruby/internal/xmalloc.h
-core_ext.o: $(hdrdir)/ruby/assert.h
-core_ext.o: $(hdrdir)/ruby/backward.h
-core_ext.o: $(hdrdir)/ruby/backward/2/assume.h
-core_ext.o: $(hdrdir)/ruby/backward/2/attributes.h
-core_ext.o: $(hdrdir)/ruby/backward/2/bool.h
-core_ext.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-core_ext.o: $(hdrdir)/ruby/backward/2/inttypes.h
-core_ext.o: $(hdrdir)/ruby/backward/2/limits.h
-core_ext.o: $(hdrdir)/ruby/backward/2/long_long.h
-core_ext.o: $(hdrdir)/ruby/backward/2/stdalign.h
-core_ext.o: $(hdrdir)/ruby/backward/2/stdarg.h
-core_ext.o: $(hdrdir)/ruby/defines.h
-core_ext.o: $(hdrdir)/ruby/intern.h
core_ext.o: $(hdrdir)/ruby/missing.h
core_ext.o: $(hdrdir)/ruby/ruby.h
core_ext.o: $(hdrdir)/ruby/st.h
core_ext.o: $(hdrdir)/ruby/subst.h
-core_ext.o: $(top_srcdir)/internal.h
core_ext.o: $(top_srcdir)/internal/bignum.h
core_ext.o: $(top_srcdir)/internal/bits.h
core_ext.o: $(top_srcdir)/internal/compilers.h
@@ -171,6 +169,18 @@ core_ext.o: core_ext.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -310,19 +320,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -331,6 +328,18 @@ init.o: init.c
my_integer.o: $(RUBY_EXTCONF_H)
my_integer.o: $(arch_hdrdir)/ruby/config.h
my_integer.o: $(hdrdir)/ruby.h
+my_integer.o: $(hdrdir)/ruby/assert.h
+my_integer.o: $(hdrdir)/ruby/backward.h
+my_integer.o: $(hdrdir)/ruby/backward/2/assume.h
+my_integer.o: $(hdrdir)/ruby/backward/2/attributes.h
+my_integer.o: $(hdrdir)/ruby/backward/2/bool.h
+my_integer.o: $(hdrdir)/ruby/backward/2/inttypes.h
+my_integer.o: $(hdrdir)/ruby/backward/2/limits.h
+my_integer.o: $(hdrdir)/ruby/backward/2/long_long.h
+my_integer.o: $(hdrdir)/ruby/backward/2/stdalign.h
+my_integer.o: $(hdrdir)/ruby/backward/2/stdarg.h
+my_integer.o: $(hdrdir)/ruby/defines.h
+my_integer.o: $(hdrdir)/ruby/intern.h
my_integer.o: $(hdrdir)/ruby/internal/anyargs.h
my_integer.o: $(hdrdir)/ruby/internal/arithmetic.h
my_integer.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -470,19 +479,6 @@ my_integer.o: $(hdrdir)/ruby/internal/value_type.h
my_integer.o: $(hdrdir)/ruby/internal/variable.h
my_integer.o: $(hdrdir)/ruby/internal/warning_push.h
my_integer.o: $(hdrdir)/ruby/internal/xmalloc.h
-my_integer.o: $(hdrdir)/ruby/assert.h
-my_integer.o: $(hdrdir)/ruby/backward.h
-my_integer.o: $(hdrdir)/ruby/backward/2/assume.h
-my_integer.o: $(hdrdir)/ruby/backward/2/attributes.h
-my_integer.o: $(hdrdir)/ruby/backward/2/bool.h
-my_integer.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-my_integer.o: $(hdrdir)/ruby/backward/2/inttypes.h
-my_integer.o: $(hdrdir)/ruby/backward/2/limits.h
-my_integer.o: $(hdrdir)/ruby/backward/2/long_long.h
-my_integer.o: $(hdrdir)/ruby/backward/2/stdalign.h
-my_integer.o: $(hdrdir)/ruby/backward/2/stdarg.h
-my_integer.o: $(hdrdir)/ruby/defines.h
-my_integer.o: $(hdrdir)/ruby/intern.h
my_integer.o: $(hdrdir)/ruby/missing.h
my_integer.o: $(hdrdir)/ruby/ruby.h
my_integer.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/iseq_load/depend b/ext/-test-/iseq_load/depend
index 26d4c01aa2e..cffd6313833 100644
--- a/ext/-test-/iseq_load/depend
+++ b/ext/-test-/iseq_load/depend
@@ -2,6 +2,18 @@
iseq_load.o: $(RUBY_EXTCONF_H)
iseq_load.o: $(arch_hdrdir)/ruby/config.h
iseq_load.o: $(hdrdir)/ruby.h
+iseq_load.o: $(hdrdir)/ruby/assert.h
+iseq_load.o: $(hdrdir)/ruby/backward.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/assume.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/attributes.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/bool.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/inttypes.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/limits.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/long_long.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/stdalign.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/stdarg.h
+iseq_load.o: $(hdrdir)/ruby/defines.h
+iseq_load.o: $(hdrdir)/ruby/intern.h
iseq_load.o: $(hdrdir)/ruby/internal/anyargs.h
iseq_load.o: $(hdrdir)/ruby/internal/arithmetic.h
iseq_load.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ iseq_load.o: $(hdrdir)/ruby/internal/value_type.h
iseq_load.o: $(hdrdir)/ruby/internal/variable.h
iseq_load.o: $(hdrdir)/ruby/internal/warning_push.h
iseq_load.o: $(hdrdir)/ruby/internal/xmalloc.h
-iseq_load.o: $(hdrdir)/ruby/assert.h
-iseq_load.o: $(hdrdir)/ruby/backward.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/assume.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/attributes.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/bool.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/inttypes.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/limits.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/long_long.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/stdalign.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/stdarg.h
-iseq_load.o: $(hdrdir)/ruby/defines.h
-iseq_load.o: $(hdrdir)/ruby/intern.h
iseq_load.o: $(hdrdir)/ruby/missing.h
iseq_load.o: $(hdrdir)/ruby/ruby.h
iseq_load.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/iter/depend b/ext/-test-/iter/depend
index 85ca8be992b..5bda724d221 100644
--- a/ext/-test-/iter/depend
+++ b/ext/-test-/iter/depend
@@ -2,6 +2,18 @@
break.o: $(RUBY_EXTCONF_H)
break.o: $(arch_hdrdir)/ruby/config.h
break.o: $(hdrdir)/ruby.h
+break.o: $(hdrdir)/ruby/assert.h
+break.o: $(hdrdir)/ruby/backward.h
+break.o: $(hdrdir)/ruby/backward/2/assume.h
+break.o: $(hdrdir)/ruby/backward/2/attributes.h
+break.o: $(hdrdir)/ruby/backward/2/bool.h
+break.o: $(hdrdir)/ruby/backward/2/inttypes.h
+break.o: $(hdrdir)/ruby/backward/2/limits.h
+break.o: $(hdrdir)/ruby/backward/2/long_long.h
+break.o: $(hdrdir)/ruby/backward/2/stdalign.h
+break.o: $(hdrdir)/ruby/backward/2/stdarg.h
+break.o: $(hdrdir)/ruby/defines.h
+break.o: $(hdrdir)/ruby/intern.h
break.o: $(hdrdir)/ruby/internal/anyargs.h
break.o: $(hdrdir)/ruby/internal/arithmetic.h
break.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ break.o: $(hdrdir)/ruby/internal/value_type.h
break.o: $(hdrdir)/ruby/internal/variable.h
break.o: $(hdrdir)/ruby/internal/warning_push.h
break.o: $(hdrdir)/ruby/internal/xmalloc.h
-break.o: $(hdrdir)/ruby/assert.h
-break.o: $(hdrdir)/ruby/backward.h
-break.o: $(hdrdir)/ruby/backward/2/assume.h
-break.o: $(hdrdir)/ruby/backward/2/attributes.h
-break.o: $(hdrdir)/ruby/backward/2/bool.h
-break.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-break.o: $(hdrdir)/ruby/backward/2/inttypes.h
-break.o: $(hdrdir)/ruby/backward/2/limits.h
-break.o: $(hdrdir)/ruby/backward/2/long_long.h
-break.o: $(hdrdir)/ruby/backward/2/stdalign.h
-break.o: $(hdrdir)/ruby/backward/2/stdarg.h
-break.o: $(hdrdir)/ruby/defines.h
-break.o: $(hdrdir)/ruby/intern.h
break.o: $(hdrdir)/ruby/missing.h
break.o: $(hdrdir)/ruby/ruby.h
break.o: $(hdrdir)/ruby/st.h
@@ -162,6 +161,18 @@ break.o: break.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -301,19 +312,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -322,6 +320,18 @@ init.o: init.c
yield.o: $(RUBY_EXTCONF_H)
yield.o: $(arch_hdrdir)/ruby/config.h
yield.o: $(hdrdir)/ruby.h
+yield.o: $(hdrdir)/ruby/assert.h
+yield.o: $(hdrdir)/ruby/backward.h
+yield.o: $(hdrdir)/ruby/backward/2/assume.h
+yield.o: $(hdrdir)/ruby/backward/2/attributes.h
+yield.o: $(hdrdir)/ruby/backward/2/bool.h
+yield.o: $(hdrdir)/ruby/backward/2/inttypes.h
+yield.o: $(hdrdir)/ruby/backward/2/limits.h
+yield.o: $(hdrdir)/ruby/backward/2/long_long.h
+yield.o: $(hdrdir)/ruby/backward/2/stdalign.h
+yield.o: $(hdrdir)/ruby/backward/2/stdarg.h
+yield.o: $(hdrdir)/ruby/defines.h
+yield.o: $(hdrdir)/ruby/intern.h
yield.o: $(hdrdir)/ruby/internal/anyargs.h
yield.o: $(hdrdir)/ruby/internal/arithmetic.h
yield.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -461,19 +471,6 @@ yield.o: $(hdrdir)/ruby/internal/value_type.h
yield.o: $(hdrdir)/ruby/internal/variable.h
yield.o: $(hdrdir)/ruby/internal/warning_push.h
yield.o: $(hdrdir)/ruby/internal/xmalloc.h
-yield.o: $(hdrdir)/ruby/assert.h
-yield.o: $(hdrdir)/ruby/backward.h
-yield.o: $(hdrdir)/ruby/backward/2/assume.h
-yield.o: $(hdrdir)/ruby/backward/2/attributes.h
-yield.o: $(hdrdir)/ruby/backward/2/bool.h
-yield.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-yield.o: $(hdrdir)/ruby/backward/2/inttypes.h
-yield.o: $(hdrdir)/ruby/backward/2/limits.h
-yield.o: $(hdrdir)/ruby/backward/2/long_long.h
-yield.o: $(hdrdir)/ruby/backward/2/stdalign.h
-yield.o: $(hdrdir)/ruby/backward/2/stdarg.h
-yield.o: $(hdrdir)/ruby/defines.h
-yield.o: $(hdrdir)/ruby/intern.h
yield.o: $(hdrdir)/ruby/missing.h
yield.o: $(hdrdir)/ruby/ruby.h
yield.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/load/protect/depend b/ext/-test-/load/protect/depend
index 6eb2ea987b7..43413b4e956 100644
--- a/ext/-test-/load/protect/depend
+++ b/ext/-test-/load/protect/depend
@@ -2,6 +2,18 @@
protect.o: $(RUBY_EXTCONF_H)
protect.o: $(arch_hdrdir)/ruby/config.h
protect.o: $(hdrdir)/ruby.h
+protect.o: $(hdrdir)/ruby/assert.h
+protect.o: $(hdrdir)/ruby/backward.h
+protect.o: $(hdrdir)/ruby/backward/2/assume.h
+protect.o: $(hdrdir)/ruby/backward/2/attributes.h
+protect.o: $(hdrdir)/ruby/backward/2/bool.h
+protect.o: $(hdrdir)/ruby/backward/2/inttypes.h
+protect.o: $(hdrdir)/ruby/backward/2/limits.h
+protect.o: $(hdrdir)/ruby/backward/2/long_long.h
+protect.o: $(hdrdir)/ruby/backward/2/stdalign.h
+protect.o: $(hdrdir)/ruby/backward/2/stdarg.h
+protect.o: $(hdrdir)/ruby/defines.h
+protect.o: $(hdrdir)/ruby/intern.h
protect.o: $(hdrdir)/ruby/internal/anyargs.h
protect.o: $(hdrdir)/ruby/internal/arithmetic.h
protect.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ protect.o: $(hdrdir)/ruby/internal/value_type.h
protect.o: $(hdrdir)/ruby/internal/variable.h
protect.o: $(hdrdir)/ruby/internal/warning_push.h
protect.o: $(hdrdir)/ruby/internal/xmalloc.h
-protect.o: $(hdrdir)/ruby/assert.h
-protect.o: $(hdrdir)/ruby/backward.h
-protect.o: $(hdrdir)/ruby/backward/2/assume.h
-protect.o: $(hdrdir)/ruby/backward/2/attributes.h
-protect.o: $(hdrdir)/ruby/backward/2/bool.h
-protect.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-protect.o: $(hdrdir)/ruby/backward/2/inttypes.h
-protect.o: $(hdrdir)/ruby/backward/2/limits.h
-protect.o: $(hdrdir)/ruby/backward/2/long_long.h
-protect.o: $(hdrdir)/ruby/backward/2/stdalign.h
-protect.o: $(hdrdir)/ruby/backward/2/stdarg.h
-protect.o: $(hdrdir)/ruby/defines.h
-protect.o: $(hdrdir)/ruby/intern.h
protect.o: $(hdrdir)/ruby/missing.h
protect.o: $(hdrdir)/ruby/ruby.h
protect.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/marshal/compat/depend b/ext/-test-/marshal/compat/depend
index 1fca7a7baff..366fb88966e 100644
--- a/ext/-test-/marshal/compat/depend
+++ b/ext/-test-/marshal/compat/depend
@@ -2,6 +2,18 @@
usrcompat.o: $(RUBY_EXTCONF_H)
usrcompat.o: $(arch_hdrdir)/ruby/config.h
usrcompat.o: $(hdrdir)/ruby.h
+usrcompat.o: $(hdrdir)/ruby/assert.h
+usrcompat.o: $(hdrdir)/ruby/backward.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/assume.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/attributes.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/bool.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/inttypes.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/limits.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/long_long.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/stdalign.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/stdarg.h
+usrcompat.o: $(hdrdir)/ruby/defines.h
+usrcompat.o: $(hdrdir)/ruby/intern.h
usrcompat.o: $(hdrdir)/ruby/internal/anyargs.h
usrcompat.o: $(hdrdir)/ruby/internal/arithmetic.h
usrcompat.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ usrcompat.o: $(hdrdir)/ruby/internal/value_type.h
usrcompat.o: $(hdrdir)/ruby/internal/variable.h
usrcompat.o: $(hdrdir)/ruby/internal/warning_push.h
usrcompat.o: $(hdrdir)/ruby/internal/xmalloc.h
-usrcompat.o: $(hdrdir)/ruby/assert.h
-usrcompat.o: $(hdrdir)/ruby/backward.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/assume.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/attributes.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/bool.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/inttypes.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/limits.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/long_long.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/stdalign.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/stdarg.h
-usrcompat.o: $(hdrdir)/ruby/defines.h
-usrcompat.o: $(hdrdir)/ruby/intern.h
usrcompat.o: $(hdrdir)/ruby/missing.h
usrcompat.o: $(hdrdir)/ruby/ruby.h
usrcompat.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/marshal/internal_ivar/depend b/ext/-test-/marshal/internal_ivar/depend
index 2b0f44c0d08..b90f9b25700 100644
--- a/ext/-test-/marshal/internal_ivar/depend
+++ b/ext/-test-/marshal/internal_ivar/depend
@@ -2,6 +2,18 @@
internal_ivar.o: $(RUBY_EXTCONF_H)
internal_ivar.o: $(arch_hdrdir)/ruby/config.h
internal_ivar.o: $(hdrdir)/ruby.h
+internal_ivar.o: $(hdrdir)/ruby/assert.h
+internal_ivar.o: $(hdrdir)/ruby/backward.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/assume.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/attributes.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/bool.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/inttypes.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/limits.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/long_long.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/stdalign.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/stdarg.h
+internal_ivar.o: $(hdrdir)/ruby/defines.h
+internal_ivar.o: $(hdrdir)/ruby/intern.h
internal_ivar.o: $(hdrdir)/ruby/internal/anyargs.h
internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic.h
internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ internal_ivar.o: $(hdrdir)/ruby/internal/value_type.h
internal_ivar.o: $(hdrdir)/ruby/internal/variable.h
internal_ivar.o: $(hdrdir)/ruby/internal/warning_push.h
internal_ivar.o: $(hdrdir)/ruby/internal/xmalloc.h
-internal_ivar.o: $(hdrdir)/ruby/assert.h
-internal_ivar.o: $(hdrdir)/ruby/backward.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/assume.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/attributes.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/bool.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/inttypes.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/limits.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/long_long.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/stdalign.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/stdarg.h
-internal_ivar.o: $(hdrdir)/ruby/defines.h
-internal_ivar.o: $(hdrdir)/ruby/intern.h
internal_ivar.o: $(hdrdir)/ruby/missing.h
internal_ivar.o: $(hdrdir)/ruby/ruby.h
internal_ivar.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/marshal/usr/depend b/ext/-test-/marshal/usr/depend
index 239798bacfa..4a01f2d5e69 100644
--- a/ext/-test-/marshal/usr/depend
+++ b/ext/-test-/marshal/usr/depend
@@ -2,6 +2,18 @@
usrmarshal.o: $(RUBY_EXTCONF_H)
usrmarshal.o: $(arch_hdrdir)/ruby/config.h
usrmarshal.o: $(hdrdir)/ruby.h
+usrmarshal.o: $(hdrdir)/ruby/assert.h
+usrmarshal.o: $(hdrdir)/ruby/backward.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/assume.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/attributes.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/bool.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/inttypes.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/limits.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/long_long.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/stdalign.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/stdarg.h
+usrmarshal.o: $(hdrdir)/ruby/defines.h
+usrmarshal.o: $(hdrdir)/ruby/intern.h
usrmarshal.o: $(hdrdir)/ruby/internal/anyargs.h
usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic.h
usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ usrmarshal.o: $(hdrdir)/ruby/internal/value_type.h
usrmarshal.o: $(hdrdir)/ruby/internal/variable.h
usrmarshal.o: $(hdrdir)/ruby/internal/warning_push.h
usrmarshal.o: $(hdrdir)/ruby/internal/xmalloc.h
-usrmarshal.o: $(hdrdir)/ruby/assert.h
-usrmarshal.o: $(hdrdir)/ruby/backward.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/assume.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/attributes.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/bool.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/inttypes.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/limits.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/long_long.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/stdalign.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/stdarg.h
-usrmarshal.o: $(hdrdir)/ruby/defines.h
-usrmarshal.o: $(hdrdir)/ruby/intern.h
usrmarshal.o: $(hdrdir)/ruby/missing.h
usrmarshal.o: $(hdrdir)/ruby/ruby.h
usrmarshal.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/memory_status/depend b/ext/-test-/memory_status/depend
index f8652cb316d..c9cc903ff67 100644
--- a/ext/-test-/memory_status/depend
+++ b/ext/-test-/memory_status/depend
@@ -7,7 +7,6 @@ memory_status.o: $(hdrdir)/ruby/backward.h
memory_status.o: $(hdrdir)/ruby/backward/2/assume.h
memory_status.o: $(hdrdir)/ruby/backward/2/attributes.h
memory_status.o: $(hdrdir)/ruby/backward/2/bool.h
-memory_status.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
memory_status.o: $(hdrdir)/ruby/backward/2/inttypes.h
memory_status.o: $(hdrdir)/ruby/backward/2/limits.h
memory_status.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/-test-/memory_view/depend b/ext/-test-/memory_view/depend
index 12198887681..c42e9f54a3c 100644
--- a/ext/-test-/memory_view/depend
+++ b/ext/-test-/memory_view/depend
@@ -7,7 +7,6 @@ memory_view.o: $(hdrdir)/ruby/backward.h
memory_view.o: $(hdrdir)/ruby/backward/2/assume.h
memory_view.o: $(hdrdir)/ruby/backward/2/attributes.h
memory_view.o: $(hdrdir)/ruby/backward/2/bool.h
-memory_view.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
memory_view.o: $(hdrdir)/ruby/backward/2/inttypes.h
memory_view.o: $(hdrdir)/ruby/backward/2/limits.h
memory_view.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/-test-/method/depend b/ext/-test-/method/depend
index 1aef2cd1820..f091d371896 100644
--- a/ext/-test-/method/depend
+++ b/ext/-test-/method/depend
@@ -2,6 +2,18 @@
arity.o: $(RUBY_EXTCONF_H)
arity.o: $(arch_hdrdir)/ruby/config.h
arity.o: $(hdrdir)/ruby.h
+arity.o: $(hdrdir)/ruby/assert.h
+arity.o: $(hdrdir)/ruby/backward.h
+arity.o: $(hdrdir)/ruby/backward/2/assume.h
+arity.o: $(hdrdir)/ruby/backward/2/attributes.h
+arity.o: $(hdrdir)/ruby/backward/2/bool.h
+arity.o: $(hdrdir)/ruby/backward/2/inttypes.h
+arity.o: $(hdrdir)/ruby/backward/2/limits.h
+arity.o: $(hdrdir)/ruby/backward/2/long_long.h
+arity.o: $(hdrdir)/ruby/backward/2/stdalign.h
+arity.o: $(hdrdir)/ruby/backward/2/stdarg.h
+arity.o: $(hdrdir)/ruby/defines.h
+arity.o: $(hdrdir)/ruby/intern.h
arity.o: $(hdrdir)/ruby/internal/anyargs.h
arity.o: $(hdrdir)/ruby/internal/arithmetic.h
arity.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ arity.o: $(hdrdir)/ruby/internal/value_type.h
arity.o: $(hdrdir)/ruby/internal/variable.h
arity.o: $(hdrdir)/ruby/internal/warning_push.h
arity.o: $(hdrdir)/ruby/internal/xmalloc.h
-arity.o: $(hdrdir)/ruby/assert.h
-arity.o: $(hdrdir)/ruby/backward.h
-arity.o: $(hdrdir)/ruby/backward/2/assume.h
-arity.o: $(hdrdir)/ruby/backward/2/attributes.h
-arity.o: $(hdrdir)/ruby/backward/2/bool.h
-arity.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-arity.o: $(hdrdir)/ruby/backward/2/inttypes.h
-arity.o: $(hdrdir)/ruby/backward/2/limits.h
-arity.o: $(hdrdir)/ruby/backward/2/long_long.h
-arity.o: $(hdrdir)/ruby/backward/2/stdalign.h
-arity.o: $(hdrdir)/ruby/backward/2/stdarg.h
-arity.o: $(hdrdir)/ruby/defines.h
-arity.o: $(hdrdir)/ruby/intern.h
arity.o: $(hdrdir)/ruby/missing.h
arity.o: $(hdrdir)/ruby/ruby.h
arity.o: $(hdrdir)/ruby/st.h
@@ -162,6 +161,18 @@ arity.o: arity.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -301,19 +312,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/notimplement/depend b/ext/-test-/notimplement/depend
index 506795a137d..73d1fec4351 100644
--- a/ext/-test-/notimplement/depend
+++ b/ext/-test-/notimplement/depend
@@ -2,6 +2,18 @@
bug.o: $(RUBY_EXTCONF_H)
bug.o: $(arch_hdrdir)/ruby/config.h
bug.o: $(hdrdir)/ruby.h
+bug.o: $(hdrdir)/ruby/assert.h
+bug.o: $(hdrdir)/ruby/backward.h
+bug.o: $(hdrdir)/ruby/backward/2/assume.h
+bug.o: $(hdrdir)/ruby/backward/2/attributes.h
+bug.o: $(hdrdir)/ruby/backward/2/bool.h
+bug.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bug.o: $(hdrdir)/ruby/backward/2/limits.h
+bug.o: $(hdrdir)/ruby/backward/2/long_long.h
+bug.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bug.o: $(hdrdir)/ruby/backward/2/stdarg.h
+bug.o: $(hdrdir)/ruby/defines.h
+bug.o: $(hdrdir)/ruby/intern.h
bug.o: $(hdrdir)/ruby/internal/anyargs.h
bug.o: $(hdrdir)/ruby/internal/arithmetic.h
bug.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ bug.o: $(hdrdir)/ruby/internal/value_type.h
bug.o: $(hdrdir)/ruby/internal/variable.h
bug.o: $(hdrdir)/ruby/internal/warning_push.h
bug.o: $(hdrdir)/ruby/internal/xmalloc.h
-bug.o: $(hdrdir)/ruby/assert.h
-bug.o: $(hdrdir)/ruby/backward.h
-bug.o: $(hdrdir)/ruby/backward/2/assume.h
-bug.o: $(hdrdir)/ruby/backward/2/attributes.h
-bug.o: $(hdrdir)/ruby/backward/2/bool.h
-bug.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-bug.o: $(hdrdir)/ruby/backward/2/inttypes.h
-bug.o: $(hdrdir)/ruby/backward/2/limits.h
-bug.o: $(hdrdir)/ruby/backward/2/long_long.h
-bug.o: $(hdrdir)/ruby/backward/2/stdalign.h
-bug.o: $(hdrdir)/ruby/backward/2/stdarg.h
-bug.o: $(hdrdir)/ruby/defines.h
-bug.o: $(hdrdir)/ruby/intern.h
bug.o: $(hdrdir)/ruby/missing.h
bug.o: $(hdrdir)/ruby/ruby.h
bug.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/num2int/depend b/ext/-test-/num2int/depend
index 692423ac63d..77db0bfb83f 100644
--- a/ext/-test-/num2int/depend
+++ b/ext/-test-/num2int/depend
@@ -2,6 +2,18 @@
num2int.o: $(RUBY_EXTCONF_H)
num2int.o: $(arch_hdrdir)/ruby/config.h
num2int.o: $(hdrdir)/ruby.h
+num2int.o: $(hdrdir)/ruby/assert.h
+num2int.o: $(hdrdir)/ruby/backward.h
+num2int.o: $(hdrdir)/ruby/backward/2/assume.h
+num2int.o: $(hdrdir)/ruby/backward/2/attributes.h
+num2int.o: $(hdrdir)/ruby/backward/2/bool.h
+num2int.o: $(hdrdir)/ruby/backward/2/inttypes.h
+num2int.o: $(hdrdir)/ruby/backward/2/limits.h
+num2int.o: $(hdrdir)/ruby/backward/2/long_long.h
+num2int.o: $(hdrdir)/ruby/backward/2/stdalign.h
+num2int.o: $(hdrdir)/ruby/backward/2/stdarg.h
+num2int.o: $(hdrdir)/ruby/defines.h
+num2int.o: $(hdrdir)/ruby/intern.h
num2int.o: $(hdrdir)/ruby/internal/anyargs.h
num2int.o: $(hdrdir)/ruby/internal/arithmetic.h
num2int.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ num2int.o: $(hdrdir)/ruby/internal/value_type.h
num2int.o: $(hdrdir)/ruby/internal/variable.h
num2int.o: $(hdrdir)/ruby/internal/warning_push.h
num2int.o: $(hdrdir)/ruby/internal/xmalloc.h
-num2int.o: $(hdrdir)/ruby/assert.h
-num2int.o: $(hdrdir)/ruby/backward.h
-num2int.o: $(hdrdir)/ruby/backward/2/assume.h
-num2int.o: $(hdrdir)/ruby/backward/2/attributes.h
-num2int.o: $(hdrdir)/ruby/backward/2/bool.h
-num2int.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-num2int.o: $(hdrdir)/ruby/backward/2/inttypes.h
-num2int.o: $(hdrdir)/ruby/backward/2/limits.h
-num2int.o: $(hdrdir)/ruby/backward/2/long_long.h
-num2int.o: $(hdrdir)/ruby/backward/2/stdalign.h
-num2int.o: $(hdrdir)/ruby/backward/2/stdarg.h
-num2int.o: $(hdrdir)/ruby/defines.h
-num2int.o: $(hdrdir)/ruby/intern.h
num2int.o: $(hdrdir)/ruby/missing.h
num2int.o: $(hdrdir)/ruby/ruby.h
num2int.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/path_to_class/depend b/ext/-test-/path_to_class/depend
index e2bc971e4ec..4911b80adc3 100644
--- a/ext/-test-/path_to_class/depend
+++ b/ext/-test-/path_to_class/depend
@@ -2,6 +2,18 @@
path_to_class.o: $(RUBY_EXTCONF_H)
path_to_class.o: $(arch_hdrdir)/ruby/config.h
path_to_class.o: $(hdrdir)/ruby.h
+path_to_class.o: $(hdrdir)/ruby/assert.h
+path_to_class.o: $(hdrdir)/ruby/backward.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/assume.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/attributes.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/bool.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/inttypes.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/limits.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/long_long.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/stdalign.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/stdarg.h
+path_to_class.o: $(hdrdir)/ruby/defines.h
+path_to_class.o: $(hdrdir)/ruby/intern.h
path_to_class.o: $(hdrdir)/ruby/internal/anyargs.h
path_to_class.o: $(hdrdir)/ruby/internal/arithmetic.h
path_to_class.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ path_to_class.o: $(hdrdir)/ruby/internal/value_type.h
path_to_class.o: $(hdrdir)/ruby/internal/variable.h
path_to_class.o: $(hdrdir)/ruby/internal/warning_push.h
path_to_class.o: $(hdrdir)/ruby/internal/xmalloc.h
-path_to_class.o: $(hdrdir)/ruby/assert.h
-path_to_class.o: $(hdrdir)/ruby/backward.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/assume.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/attributes.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/bool.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/inttypes.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/limits.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/long_long.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/stdalign.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/stdarg.h
-path_to_class.o: $(hdrdir)/ruby/defines.h
-path_to_class.o: $(hdrdir)/ruby/intern.h
path_to_class.o: $(hdrdir)/ruby/missing.h
path_to_class.o: $(hdrdir)/ruby/ruby.h
path_to_class.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/postponed_job/depend b/ext/-test-/postponed_job/depend
index acabceb0fb6..36f08b6ebd6 100644
--- a/ext/-test-/postponed_job/depend
+++ b/ext/-test-/postponed_job/depend
@@ -2,6 +2,19 @@
postponed_job.o: $(RUBY_EXTCONF_H)
postponed_job.o: $(arch_hdrdir)/ruby/config.h
postponed_job.o: $(hdrdir)/ruby.h
+postponed_job.o: $(hdrdir)/ruby/assert.h
+postponed_job.o: $(hdrdir)/ruby/backward.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/assume.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/attributes.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/bool.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/inttypes.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/limits.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/long_long.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/stdalign.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/stdarg.h
+postponed_job.o: $(hdrdir)/ruby/debug.h
+postponed_job.o: $(hdrdir)/ruby/defines.h
+postponed_job.o: $(hdrdir)/ruby/intern.h
postponed_job.o: $(hdrdir)/ruby/internal/anyargs.h
postponed_job.o: $(hdrdir)/ruby/internal/arithmetic.h
postponed_job.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,20 +154,6 @@ postponed_job.o: $(hdrdir)/ruby/internal/value_type.h
postponed_job.o: $(hdrdir)/ruby/internal/variable.h
postponed_job.o: $(hdrdir)/ruby/internal/warning_push.h
postponed_job.o: $(hdrdir)/ruby/internal/xmalloc.h
-postponed_job.o: $(hdrdir)/ruby/assert.h
-postponed_job.o: $(hdrdir)/ruby/backward.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/assume.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/attributes.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/bool.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/inttypes.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/limits.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/long_long.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/stdalign.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/stdarg.h
-postponed_job.o: $(hdrdir)/ruby/debug.h
-postponed_job.o: $(hdrdir)/ruby/defines.h
-postponed_job.o: $(hdrdir)/ruby/intern.h
postponed_job.o: $(hdrdir)/ruby/missing.h
postponed_job.o: $(hdrdir)/ruby/ruby.h
postponed_job.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/postponed_job/postponed_job.c b/ext/-test-/postponed_job/postponed_job.c
index d8684d475a4..fa57bef6f5a 100644
--- a/ext/-test-/postponed_job/postponed_job.c
+++ b/ext/-test-/postponed_job/postponed_job.c
@@ -58,6 +58,34 @@ pjob_call_direct(VALUE self, VALUE obj)
return self;
}
+#ifdef HAVE_PTHREAD_H
+#include <pthread.h>
+
+static void *
+pjob_register_in_c_thread_i(void *obj)
+{
+ rb_postponed_job_register_one(0, pjob_one_callback, (void *)obj);
+ rb_postponed_job_register_one(0, pjob_one_callback, (void *)obj);
+ rb_postponed_job_register_one(0, pjob_one_callback, (void *)obj);
+ return NULL;
+}
+
+static VALUE
+pjob_register_in_c_thread(VALUE self, VALUE obj)
+{
+ pthread_t thread;
+ if (pthread_create(&thread, NULL, pjob_register_in_c_thread_i, (void *)obj)) {
+ return Qfalse;
+ }
+
+ if (pthread_join(thread, NULL)) {
+ return Qfalse;
+ }
+
+ return Qtrue;
+}
+#endif
+
void
Init_postponed_job(VALUE self)
{
@@ -65,5 +93,8 @@ Init_postponed_job(VALUE self)
rb_define_module_function(mBug, "postponed_job_register", pjob_register, 1);
rb_define_module_function(mBug, "postponed_job_register_one", pjob_register_one, 1);
rb_define_module_function(mBug, "postponed_job_call_direct", pjob_call_direct, 1);
+#ifdef HAVE_PTHREAD_H
+ rb_define_module_function(mBug, "postponed_job_register_in_c_thread", pjob_register_in_c_thread, 1);
+#endif
}
diff --git a/ext/-test-/printf/depend b/ext/-test-/printf/depend
index 72f3b081be1..143317c778a 100644
--- a/ext/-test-/printf/depend
+++ b/ext/-test-/printf/depend
@@ -7,7 +7,6 @@ printf.o: $(hdrdir)/ruby/backward.h
printf.o: $(hdrdir)/ruby/backward/2/assume.h
printf.o: $(hdrdir)/ruby/backward/2/attributes.h
printf.o: $(hdrdir)/ruby/backward/2/bool.h
-printf.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
printf.o: $(hdrdir)/ruby/backward/2/inttypes.h
printf.o: $(hdrdir)/ruby/backward/2/limits.h
printf.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/-test-/proc/depend b/ext/-test-/proc/depend
index 929b4927dc7..a1ce4cdf42b 100644
--- a/ext/-test-/proc/depend
+++ b/ext/-test-/proc/depend
@@ -2,6 +2,18 @@
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -162,6 +161,18 @@ init.o: init.c
receiver.o: $(RUBY_EXTCONF_H)
receiver.o: $(arch_hdrdir)/ruby/config.h
receiver.o: $(hdrdir)/ruby.h
+receiver.o: $(hdrdir)/ruby/assert.h
+receiver.o: $(hdrdir)/ruby/backward.h
+receiver.o: $(hdrdir)/ruby/backward/2/assume.h
+receiver.o: $(hdrdir)/ruby/backward/2/attributes.h
+receiver.o: $(hdrdir)/ruby/backward/2/bool.h
+receiver.o: $(hdrdir)/ruby/backward/2/inttypes.h
+receiver.o: $(hdrdir)/ruby/backward/2/limits.h
+receiver.o: $(hdrdir)/ruby/backward/2/long_long.h
+receiver.o: $(hdrdir)/ruby/backward/2/stdalign.h
+receiver.o: $(hdrdir)/ruby/backward/2/stdarg.h
+receiver.o: $(hdrdir)/ruby/defines.h
+receiver.o: $(hdrdir)/ruby/intern.h
receiver.o: $(hdrdir)/ruby/internal/anyargs.h
receiver.o: $(hdrdir)/ruby/internal/arithmetic.h
receiver.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -301,19 +312,6 @@ receiver.o: $(hdrdir)/ruby/internal/value_type.h
receiver.o: $(hdrdir)/ruby/internal/variable.h
receiver.o: $(hdrdir)/ruby/internal/warning_push.h
receiver.o: $(hdrdir)/ruby/internal/xmalloc.h
-receiver.o: $(hdrdir)/ruby/assert.h
-receiver.o: $(hdrdir)/ruby/backward.h
-receiver.o: $(hdrdir)/ruby/backward/2/assume.h
-receiver.o: $(hdrdir)/ruby/backward/2/attributes.h
-receiver.o: $(hdrdir)/ruby/backward/2/bool.h
-receiver.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-receiver.o: $(hdrdir)/ruby/backward/2/inttypes.h
-receiver.o: $(hdrdir)/ruby/backward/2/limits.h
-receiver.o: $(hdrdir)/ruby/backward/2/long_long.h
-receiver.o: $(hdrdir)/ruby/backward/2/stdalign.h
-receiver.o: $(hdrdir)/ruby/backward/2/stdarg.h
-receiver.o: $(hdrdir)/ruby/defines.h
-receiver.o: $(hdrdir)/ruby/intern.h
receiver.o: $(hdrdir)/ruby/missing.h
receiver.o: $(hdrdir)/ruby/ruby.h
receiver.o: $(hdrdir)/ruby/st.h
@@ -322,6 +320,18 @@ receiver.o: receiver.c
super.o: $(RUBY_EXTCONF_H)
super.o: $(arch_hdrdir)/ruby/config.h
super.o: $(hdrdir)/ruby.h
+super.o: $(hdrdir)/ruby/assert.h
+super.o: $(hdrdir)/ruby/backward.h
+super.o: $(hdrdir)/ruby/backward/2/assume.h
+super.o: $(hdrdir)/ruby/backward/2/attributes.h
+super.o: $(hdrdir)/ruby/backward/2/bool.h
+super.o: $(hdrdir)/ruby/backward/2/inttypes.h
+super.o: $(hdrdir)/ruby/backward/2/limits.h
+super.o: $(hdrdir)/ruby/backward/2/long_long.h
+super.o: $(hdrdir)/ruby/backward/2/stdalign.h
+super.o: $(hdrdir)/ruby/backward/2/stdarg.h
+super.o: $(hdrdir)/ruby/defines.h
+super.o: $(hdrdir)/ruby/intern.h
super.o: $(hdrdir)/ruby/internal/anyargs.h
super.o: $(hdrdir)/ruby/internal/arithmetic.h
super.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -461,19 +471,6 @@ super.o: $(hdrdir)/ruby/internal/value_type.h
super.o: $(hdrdir)/ruby/internal/variable.h
super.o: $(hdrdir)/ruby/internal/warning_push.h
super.o: $(hdrdir)/ruby/internal/xmalloc.h
-super.o: $(hdrdir)/ruby/assert.h
-super.o: $(hdrdir)/ruby/backward.h
-super.o: $(hdrdir)/ruby/backward/2/assume.h
-super.o: $(hdrdir)/ruby/backward/2/attributes.h
-super.o: $(hdrdir)/ruby/backward/2/bool.h
-super.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-super.o: $(hdrdir)/ruby/backward/2/inttypes.h
-super.o: $(hdrdir)/ruby/backward/2/limits.h
-super.o: $(hdrdir)/ruby/backward/2/long_long.h
-super.o: $(hdrdir)/ruby/backward/2/stdalign.h
-super.o: $(hdrdir)/ruby/backward/2/stdarg.h
-super.o: $(hdrdir)/ruby/defines.h
-super.o: $(hdrdir)/ruby/intern.h
super.o: $(hdrdir)/ruby/missing.h
super.o: $(hdrdir)/ruby/ruby.h
super.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/random/depend b/ext/-test-/random/depend
index 799b563075f..7cef34f1157 100644
--- a/ext/-test-/random/depend
+++ b/ext/-test-/random/depend
@@ -7,12 +7,9 @@ init.o: $(hdrdir)/ruby/backward.h
init.o: $(hdrdir)/ruby/backward/2/assume.h
init.o: $(hdrdir)/ruby/backward/2/attributes.h
init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
init.o: $(hdrdir)/ruby/backward/2/inttypes.h
init.o: $(hdrdir)/ruby/backward/2/limits.h
init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/r_cast.h
-init.o: $(hdrdir)/ruby/backward/2/rmodule.h
init.o: $(hdrdir)/ruby/backward/2/stdalign.h
init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
@@ -168,12 +165,9 @@ loop.o: $(hdrdir)/ruby/backward.h
loop.o: $(hdrdir)/ruby/backward/2/assume.h
loop.o: $(hdrdir)/ruby/backward/2/attributes.h
loop.o: $(hdrdir)/ruby/backward/2/bool.h
-loop.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
loop.o: $(hdrdir)/ruby/backward/2/inttypes.h
loop.o: $(hdrdir)/ruby/backward/2/limits.h
loop.o: $(hdrdir)/ruby/backward/2/long_long.h
-loop.o: $(hdrdir)/ruby/backward/2/r_cast.h
-loop.o: $(hdrdir)/ruby/backward/2/rmodule.h
loop.o: $(hdrdir)/ruby/backward/2/stdalign.h
loop.o: $(hdrdir)/ruby/backward/2/stdarg.h
loop.o: $(hdrdir)/ruby/defines.h
diff --git a/ext/-test-/rational/depend b/ext/-test-/rational/depend
index 67ac3c6f904..3fbe6e0a077 100644
--- a/ext/-test-/rational/depend
+++ b/ext/-test-/rational/depend
@@ -5,7 +5,19 @@ rat.o: rat.c $(top_srcdir)/internal.h
# AUTOGENERATED DEPENDENCIES START
rat.o: $(RUBY_EXTCONF_H)
rat.o: $(arch_hdrdir)/ruby/config.h
-rat.o: $(hdrdir)/ruby.h
+rat.o: $(hdrdir)/ruby/assert.h
+rat.o: $(hdrdir)/ruby/backward.h
+rat.o: $(hdrdir)/ruby/backward/2/assume.h
+rat.o: $(hdrdir)/ruby/backward/2/attributes.h
+rat.o: $(hdrdir)/ruby/backward/2/bool.h
+rat.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+rat.o: $(hdrdir)/ruby/backward/2/inttypes.h
+rat.o: $(hdrdir)/ruby/backward/2/limits.h
+rat.o: $(hdrdir)/ruby/backward/2/long_long.h
+rat.o: $(hdrdir)/ruby/backward/2/stdalign.h
+rat.o: $(hdrdir)/ruby/backward/2/stdarg.h
+rat.o: $(hdrdir)/ruby/defines.h
+rat.o: $(hdrdir)/ruby/intern.h
rat.o: $(hdrdir)/ruby/internal/anyargs.h
rat.o: $(hdrdir)/ruby/internal/arithmetic.h
rat.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -145,24 +157,10 @@ rat.o: $(hdrdir)/ruby/internal/value_type.h
rat.o: $(hdrdir)/ruby/internal/variable.h
rat.o: $(hdrdir)/ruby/internal/warning_push.h
rat.o: $(hdrdir)/ruby/internal/xmalloc.h
-rat.o: $(hdrdir)/ruby/assert.h
-rat.o: $(hdrdir)/ruby/backward.h
-rat.o: $(hdrdir)/ruby/backward/2/assume.h
-rat.o: $(hdrdir)/ruby/backward/2/attributes.h
-rat.o: $(hdrdir)/ruby/backward/2/bool.h
-rat.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-rat.o: $(hdrdir)/ruby/backward/2/inttypes.h
-rat.o: $(hdrdir)/ruby/backward/2/limits.h
-rat.o: $(hdrdir)/ruby/backward/2/long_long.h
-rat.o: $(hdrdir)/ruby/backward/2/stdalign.h
-rat.o: $(hdrdir)/ruby/backward/2/stdarg.h
-rat.o: $(hdrdir)/ruby/defines.h
-rat.o: $(hdrdir)/ruby/intern.h
rat.o: $(hdrdir)/ruby/missing.h
rat.o: $(hdrdir)/ruby/ruby.h
rat.o: $(hdrdir)/ruby/st.h
rat.o: $(hdrdir)/ruby/subst.h
-rat.o: $(top_srcdir)/internal.h
rat.o: $(top_srcdir)/internal/bignum.h
rat.o: $(top_srcdir)/internal/bits.h
rat.o: $(top_srcdir)/internal/compilers.h
diff --git a/ext/-test-/rb_call_super_kw/depend b/ext/-test-/rb_call_super_kw/depend
index 25725f9a9a3..a8126a9efe7 100644
--- a/ext/-test-/rb_call_super_kw/depend
+++ b/ext/-test-/rb_call_super_kw/depend
@@ -2,6 +2,18 @@
rb_call_super_kw.o: $(RUBY_EXTCONF_H)
rb_call_super_kw.o: $(arch_hdrdir)/ruby/config.h
rb_call_super_kw.o: $(hdrdir)/ruby.h
+rb_call_super_kw.o: $(hdrdir)/ruby/assert.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/assume.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/attributes.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/bool.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/inttypes.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/limits.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/long_long.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/stdalign.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/stdarg.h
+rb_call_super_kw.o: $(hdrdir)/ruby/defines.h
+rb_call_super_kw.o: $(hdrdir)/ruby/intern.h
rb_call_super_kw.o: $(hdrdir)/ruby/internal/anyargs.h
rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic.h
rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ rb_call_super_kw.o: $(hdrdir)/ruby/internal/value_type.h
rb_call_super_kw.o: $(hdrdir)/ruby/internal/variable.h
rb_call_super_kw.o: $(hdrdir)/ruby/internal/warning_push.h
rb_call_super_kw.o: $(hdrdir)/ruby/internal/xmalloc.h
-rb_call_super_kw.o: $(hdrdir)/ruby/assert.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/assume.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/attributes.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/bool.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/inttypes.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/limits.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/long_long.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/stdalign.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/stdarg.h
-rb_call_super_kw.o: $(hdrdir)/ruby/defines.h
-rb_call_super_kw.o: $(hdrdir)/ruby/intern.h
rb_call_super_kw.o: $(hdrdir)/ruby/missing.h
rb_call_super_kw.o: $(hdrdir)/ruby/ruby.h
rb_call_super_kw.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/recursion/depend b/ext/-test-/recursion/depend
index 14bfbfca4e1..12d7ae60265 100644
--- a/ext/-test-/recursion/depend
+++ b/ext/-test-/recursion/depend
@@ -2,6 +2,18 @@
recursion.o: $(RUBY_EXTCONF_H)
recursion.o: $(arch_hdrdir)/ruby/config.h
recursion.o: $(hdrdir)/ruby.h
+recursion.o: $(hdrdir)/ruby/assert.h
+recursion.o: $(hdrdir)/ruby/backward.h
+recursion.o: $(hdrdir)/ruby/backward/2/assume.h
+recursion.o: $(hdrdir)/ruby/backward/2/attributes.h
+recursion.o: $(hdrdir)/ruby/backward/2/bool.h
+recursion.o: $(hdrdir)/ruby/backward/2/inttypes.h
+recursion.o: $(hdrdir)/ruby/backward/2/limits.h
+recursion.o: $(hdrdir)/ruby/backward/2/long_long.h
+recursion.o: $(hdrdir)/ruby/backward/2/stdalign.h
+recursion.o: $(hdrdir)/ruby/backward/2/stdarg.h
+recursion.o: $(hdrdir)/ruby/defines.h
+recursion.o: $(hdrdir)/ruby/intern.h
recursion.o: $(hdrdir)/ruby/internal/anyargs.h
recursion.o: $(hdrdir)/ruby/internal/arithmetic.h
recursion.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ recursion.o: $(hdrdir)/ruby/internal/value_type.h
recursion.o: $(hdrdir)/ruby/internal/variable.h
recursion.o: $(hdrdir)/ruby/internal/warning_push.h
recursion.o: $(hdrdir)/ruby/internal/xmalloc.h
-recursion.o: $(hdrdir)/ruby/assert.h
-recursion.o: $(hdrdir)/ruby/backward.h
-recursion.o: $(hdrdir)/ruby/backward/2/assume.h
-recursion.o: $(hdrdir)/ruby/backward/2/attributes.h
-recursion.o: $(hdrdir)/ruby/backward/2/bool.h
-recursion.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-recursion.o: $(hdrdir)/ruby/backward/2/inttypes.h
-recursion.o: $(hdrdir)/ruby/backward/2/limits.h
-recursion.o: $(hdrdir)/ruby/backward/2/long_long.h
-recursion.o: $(hdrdir)/ruby/backward/2/stdalign.h
-recursion.o: $(hdrdir)/ruby/backward/2/stdarg.h
-recursion.o: $(hdrdir)/ruby/defines.h
-recursion.o: $(hdrdir)/ruby/intern.h
recursion.o: $(hdrdir)/ruby/missing.h
recursion.o: $(hdrdir)/ruby/ruby.h
recursion.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/regexp/depend b/ext/-test-/regexp/depend
index 1e2b2253162..c46d8762412 100644
--- a/ext/-test-/regexp/depend
+++ b/ext/-test-/regexp/depend
@@ -2,6 +2,18 @@
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -162,6 +161,18 @@ init.o: init.c
parse_depth_limit.o: $(RUBY_EXTCONF_H)
parse_depth_limit.o: $(arch_hdrdir)/ruby/config.h
parse_depth_limit.o: $(hdrdir)/ruby.h
+parse_depth_limit.o: $(hdrdir)/ruby/assert.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/assume.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/attributes.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/bool.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/inttypes.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/limits.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/long_long.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/stdalign.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/stdarg.h
+parse_depth_limit.o: $(hdrdir)/ruby/defines.h
+parse_depth_limit.o: $(hdrdir)/ruby/intern.h
parse_depth_limit.o: $(hdrdir)/ruby/internal/anyargs.h
parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic.h
parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -301,19 +312,6 @@ parse_depth_limit.o: $(hdrdir)/ruby/internal/value_type.h
parse_depth_limit.o: $(hdrdir)/ruby/internal/variable.h
parse_depth_limit.o: $(hdrdir)/ruby/internal/warning_push.h
parse_depth_limit.o: $(hdrdir)/ruby/internal/xmalloc.h
-parse_depth_limit.o: $(hdrdir)/ruby/assert.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/assume.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/attributes.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/bool.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/inttypes.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/limits.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/long_long.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/stdalign.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/stdarg.h
-parse_depth_limit.o: $(hdrdir)/ruby/defines.h
-parse_depth_limit.o: $(hdrdir)/ruby/intern.h
parse_depth_limit.o: $(hdrdir)/ruby/missing.h
parse_depth_limit.o: $(hdrdir)/ruby/onigmo.h
parse_depth_limit.o: $(hdrdir)/ruby/ruby.h
diff --git a/ext/-test-/scan_args/depend b/ext/-test-/scan_args/depend
index e01de3124e3..99fd82ce342 100644
--- a/ext/-test-/scan_args/depend
+++ b/ext/-test-/scan_args/depend
@@ -2,6 +2,18 @@
scan_args.o: $(RUBY_EXTCONF_H)
scan_args.o: $(arch_hdrdir)/ruby/config.h
scan_args.o: $(hdrdir)/ruby.h
+scan_args.o: $(hdrdir)/ruby/assert.h
+scan_args.o: $(hdrdir)/ruby/backward.h
+scan_args.o: $(hdrdir)/ruby/backward/2/assume.h
+scan_args.o: $(hdrdir)/ruby/backward/2/attributes.h
+scan_args.o: $(hdrdir)/ruby/backward/2/bool.h
+scan_args.o: $(hdrdir)/ruby/backward/2/inttypes.h
+scan_args.o: $(hdrdir)/ruby/backward/2/limits.h
+scan_args.o: $(hdrdir)/ruby/backward/2/long_long.h
+scan_args.o: $(hdrdir)/ruby/backward/2/stdalign.h
+scan_args.o: $(hdrdir)/ruby/backward/2/stdarg.h
+scan_args.o: $(hdrdir)/ruby/defines.h
+scan_args.o: $(hdrdir)/ruby/intern.h
scan_args.o: $(hdrdir)/ruby/internal/anyargs.h
scan_args.o: $(hdrdir)/ruby/internal/arithmetic.h
scan_args.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ scan_args.o: $(hdrdir)/ruby/internal/value_type.h
scan_args.o: $(hdrdir)/ruby/internal/variable.h
scan_args.o: $(hdrdir)/ruby/internal/warning_push.h
scan_args.o: $(hdrdir)/ruby/internal/xmalloc.h
-scan_args.o: $(hdrdir)/ruby/assert.h
-scan_args.o: $(hdrdir)/ruby/backward.h
-scan_args.o: $(hdrdir)/ruby/backward/2/assume.h
-scan_args.o: $(hdrdir)/ruby/backward/2/attributes.h
-scan_args.o: $(hdrdir)/ruby/backward/2/bool.h
-scan_args.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-scan_args.o: $(hdrdir)/ruby/backward/2/inttypes.h
-scan_args.o: $(hdrdir)/ruby/backward/2/limits.h
-scan_args.o: $(hdrdir)/ruby/backward/2/long_long.h
-scan_args.o: $(hdrdir)/ruby/backward/2/stdalign.h
-scan_args.o: $(hdrdir)/ruby/backward/2/stdarg.h
-scan_args.o: $(hdrdir)/ruby/defines.h
-scan_args.o: $(hdrdir)/ruby/intern.h
scan_args.o: $(hdrdir)/ruby/missing.h
scan_args.o: $(hdrdir)/ruby/ruby.h
scan_args.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/st/foreach/depend b/ext/-test-/st/foreach/depend
index d9c0f56d116..6128230798b 100644
--- a/ext/-test-/st/foreach/depend
+++ b/ext/-test-/st/foreach/depend
@@ -2,6 +2,18 @@
foreach.o: $(RUBY_EXTCONF_H)
foreach.o: $(arch_hdrdir)/ruby/config.h
foreach.o: $(hdrdir)/ruby.h
+foreach.o: $(hdrdir)/ruby/assert.h
+foreach.o: $(hdrdir)/ruby/backward.h
+foreach.o: $(hdrdir)/ruby/backward/2/assume.h
+foreach.o: $(hdrdir)/ruby/backward/2/attributes.h
+foreach.o: $(hdrdir)/ruby/backward/2/bool.h
+foreach.o: $(hdrdir)/ruby/backward/2/inttypes.h
+foreach.o: $(hdrdir)/ruby/backward/2/limits.h
+foreach.o: $(hdrdir)/ruby/backward/2/long_long.h
+foreach.o: $(hdrdir)/ruby/backward/2/stdalign.h
+foreach.o: $(hdrdir)/ruby/backward/2/stdarg.h
+foreach.o: $(hdrdir)/ruby/defines.h
+foreach.o: $(hdrdir)/ruby/intern.h
foreach.o: $(hdrdir)/ruby/internal/anyargs.h
foreach.o: $(hdrdir)/ruby/internal/arithmetic.h
foreach.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ foreach.o: $(hdrdir)/ruby/internal/value_type.h
foreach.o: $(hdrdir)/ruby/internal/variable.h
foreach.o: $(hdrdir)/ruby/internal/warning_push.h
foreach.o: $(hdrdir)/ruby/internal/xmalloc.h
-foreach.o: $(hdrdir)/ruby/assert.h
-foreach.o: $(hdrdir)/ruby/backward.h
-foreach.o: $(hdrdir)/ruby/backward/2/assume.h
-foreach.o: $(hdrdir)/ruby/backward/2/attributes.h
-foreach.o: $(hdrdir)/ruby/backward/2/bool.h
-foreach.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-foreach.o: $(hdrdir)/ruby/backward/2/inttypes.h
-foreach.o: $(hdrdir)/ruby/backward/2/limits.h
-foreach.o: $(hdrdir)/ruby/backward/2/long_long.h
-foreach.o: $(hdrdir)/ruby/backward/2/stdalign.h
-foreach.o: $(hdrdir)/ruby/backward/2/stdarg.h
-foreach.o: $(hdrdir)/ruby/defines.h
-foreach.o: $(hdrdir)/ruby/intern.h
foreach.o: $(hdrdir)/ruby/missing.h
foreach.o: $(hdrdir)/ruby/ruby.h
foreach.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/st/numhash/depend b/ext/-test-/st/numhash/depend
index 8df4fed3e4f..b3475f5fc59 100644
--- a/ext/-test-/st/numhash/depend
+++ b/ext/-test-/st/numhash/depend
@@ -2,6 +2,18 @@
numhash.o: $(RUBY_EXTCONF_H)
numhash.o: $(arch_hdrdir)/ruby/config.h
numhash.o: $(hdrdir)/ruby.h
+numhash.o: $(hdrdir)/ruby/assert.h
+numhash.o: $(hdrdir)/ruby/backward.h
+numhash.o: $(hdrdir)/ruby/backward/2/assume.h
+numhash.o: $(hdrdir)/ruby/backward/2/attributes.h
+numhash.o: $(hdrdir)/ruby/backward/2/bool.h
+numhash.o: $(hdrdir)/ruby/backward/2/inttypes.h
+numhash.o: $(hdrdir)/ruby/backward/2/limits.h
+numhash.o: $(hdrdir)/ruby/backward/2/long_long.h
+numhash.o: $(hdrdir)/ruby/backward/2/stdalign.h
+numhash.o: $(hdrdir)/ruby/backward/2/stdarg.h
+numhash.o: $(hdrdir)/ruby/defines.h
+numhash.o: $(hdrdir)/ruby/intern.h
numhash.o: $(hdrdir)/ruby/internal/anyargs.h
numhash.o: $(hdrdir)/ruby/internal/arithmetic.h
numhash.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ numhash.o: $(hdrdir)/ruby/internal/value_type.h
numhash.o: $(hdrdir)/ruby/internal/variable.h
numhash.o: $(hdrdir)/ruby/internal/warning_push.h
numhash.o: $(hdrdir)/ruby/internal/xmalloc.h
-numhash.o: $(hdrdir)/ruby/assert.h
-numhash.o: $(hdrdir)/ruby/backward.h
-numhash.o: $(hdrdir)/ruby/backward/2/assume.h
-numhash.o: $(hdrdir)/ruby/backward/2/attributes.h
-numhash.o: $(hdrdir)/ruby/backward/2/bool.h
-numhash.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-numhash.o: $(hdrdir)/ruby/backward/2/inttypes.h
-numhash.o: $(hdrdir)/ruby/backward/2/limits.h
-numhash.o: $(hdrdir)/ruby/backward/2/long_long.h
-numhash.o: $(hdrdir)/ruby/backward/2/stdalign.h
-numhash.o: $(hdrdir)/ruby/backward/2/stdarg.h
-numhash.o: $(hdrdir)/ruby/defines.h
-numhash.o: $(hdrdir)/ruby/intern.h
numhash.o: $(hdrdir)/ruby/missing.h
numhash.o: $(hdrdir)/ruby/ruby.h
numhash.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/st/update/depend b/ext/-test-/st/update/depend
index b840e67f3b0..bbf97cbbfb6 100644
--- a/ext/-test-/st/update/depend
+++ b/ext/-test-/st/update/depend
@@ -2,6 +2,18 @@
update.o: $(RUBY_EXTCONF_H)
update.o: $(arch_hdrdir)/ruby/config.h
update.o: $(hdrdir)/ruby.h
+update.o: $(hdrdir)/ruby/assert.h
+update.o: $(hdrdir)/ruby/backward.h
+update.o: $(hdrdir)/ruby/backward/2/assume.h
+update.o: $(hdrdir)/ruby/backward/2/attributes.h
+update.o: $(hdrdir)/ruby/backward/2/bool.h
+update.o: $(hdrdir)/ruby/backward/2/inttypes.h
+update.o: $(hdrdir)/ruby/backward/2/limits.h
+update.o: $(hdrdir)/ruby/backward/2/long_long.h
+update.o: $(hdrdir)/ruby/backward/2/stdalign.h
+update.o: $(hdrdir)/ruby/backward/2/stdarg.h
+update.o: $(hdrdir)/ruby/defines.h
+update.o: $(hdrdir)/ruby/intern.h
update.o: $(hdrdir)/ruby/internal/anyargs.h
update.o: $(hdrdir)/ruby/internal/arithmetic.h
update.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ update.o: $(hdrdir)/ruby/internal/value_type.h
update.o: $(hdrdir)/ruby/internal/variable.h
update.o: $(hdrdir)/ruby/internal/warning_push.h
update.o: $(hdrdir)/ruby/internal/xmalloc.h
-update.o: $(hdrdir)/ruby/assert.h
-update.o: $(hdrdir)/ruby/backward.h
-update.o: $(hdrdir)/ruby/backward/2/assume.h
-update.o: $(hdrdir)/ruby/backward/2/attributes.h
-update.o: $(hdrdir)/ruby/backward/2/bool.h
-update.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-update.o: $(hdrdir)/ruby/backward/2/inttypes.h
-update.o: $(hdrdir)/ruby/backward/2/limits.h
-update.o: $(hdrdir)/ruby/backward/2/long_long.h
-update.o: $(hdrdir)/ruby/backward/2/stdalign.h
-update.o: $(hdrdir)/ruby/backward/2/stdarg.h
-update.o: $(hdrdir)/ruby/defines.h
-update.o: $(hdrdir)/ruby/intern.h
update.o: $(hdrdir)/ruby/missing.h
update.o: $(hdrdir)/ruby/ruby.h
update.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/string/depend b/ext/-test-/string/depend
index 5eb01205784..1e2e1231303 100644
--- a/ext/-test-/string/depend
+++ b/ext/-test-/string/depend
@@ -170,7 +170,6 @@ capacity.o: $(hdrdir)/ruby/oniguruma.h
capacity.o: $(hdrdir)/ruby/ruby.h
capacity.o: $(hdrdir)/ruby/st.h
capacity.o: $(hdrdir)/ruby/subst.h
-capacity.o: $(top_srcdir)/internal.h
capacity.o: $(top_srcdir)/internal/compilers.h
capacity.o: $(top_srcdir)/internal/string.h
capacity.o: capacity.c
@@ -181,7 +180,6 @@ coderange.o: $(hdrdir)/ruby/backward.h
coderange.o: $(hdrdir)/ruby/backward/2/assume.h
coderange.o: $(hdrdir)/ruby/backward/2/attributes.h
coderange.o: $(hdrdir)/ruby/backward/2/bool.h
-coderange.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
coderange.o: $(hdrdir)/ruby/backward/2/inttypes.h
coderange.o: $(hdrdir)/ruby/backward/2/limits.h
coderange.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -347,7 +345,6 @@ coderange.o: $(hdrdir)/ruby/subst.h
coderange.o: coderange.c
cstr.o: $(RUBY_EXTCONF_H)
cstr.o: $(arch_hdrdir)/ruby/config.h
-cstr.o: $(hdrdir)/ruby.h
cstr.o: $(hdrdir)/ruby/assert.h
cstr.o: $(hdrdir)/ruby/backward.h
cstr.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -518,7 +515,6 @@ cstr.o: $(hdrdir)/ruby/st.h
cstr.o: $(hdrdir)/ruby/subst.h
cstr.o: $(top_srcdir)/internal.h
cstr.o: $(top_srcdir)/internal/compilers.h
-cstr.o: $(top_srcdir)/internal/error.h
cstr.o: $(top_srcdir)/internal/string.h
cstr.o: cstr.c
ellipsize.o: $(RUBY_EXTCONF_H)
@@ -529,7 +525,6 @@ ellipsize.o: $(hdrdir)/ruby/backward.h
ellipsize.o: $(hdrdir)/ruby/backward/2/assume.h
ellipsize.o: $(hdrdir)/ruby/backward/2/attributes.h
ellipsize.o: $(hdrdir)/ruby/backward/2/bool.h
-ellipsize.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
ellipsize.o: $(hdrdir)/ruby/backward/2/inttypes.h
ellipsize.o: $(hdrdir)/ruby/backward/2/limits.h
ellipsize.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -689,7 +684,6 @@ enc_associate.o: $(hdrdir)/ruby/backward.h
enc_associate.o: $(hdrdir)/ruby/backward/2/assume.h
enc_associate.o: $(hdrdir)/ruby/backward/2/attributes.h
enc_associate.o: $(hdrdir)/ruby/backward/2/bool.h
-enc_associate.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
enc_associate.o: $(hdrdir)/ruby/backward/2/inttypes.h
enc_associate.o: $(hdrdir)/ruby/backward/2/limits.h
enc_associate.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -860,7 +854,6 @@ enc_str_buf_cat.o: $(hdrdir)/ruby/backward.h
enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/assume.h
enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/attributes.h
enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/bool.h
-enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/inttypes.h
enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/limits.h
enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -1032,7 +1025,6 @@ fstring.o: $(hdrdir)/ruby/backward.h
fstring.o: $(hdrdir)/ruby/backward/2/assume.h
fstring.o: $(hdrdir)/ruby/backward/2/attributes.h
fstring.o: $(hdrdir)/ruby/backward/2/bool.h
-fstring.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
fstring.o: $(hdrdir)/ruby/backward/2/inttypes.h
fstring.o: $(hdrdir)/ruby/backward/2/limits.h
fstring.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -1204,7 +1196,6 @@ init.o: $(hdrdir)/ruby/backward.h
init.o: $(hdrdir)/ruby/backward/2/assume.h
init.o: $(hdrdir)/ruby/backward/2/attributes.h
init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
init.o: $(hdrdir)/ruby/backward/2/inttypes.h
init.o: $(hdrdir)/ruby/backward/2/limits.h
init.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -1364,7 +1355,6 @@ modify.o: $(hdrdir)/ruby/backward.h
modify.o: $(hdrdir)/ruby/backward/2/assume.h
modify.o: $(hdrdir)/ruby/backward/2/attributes.h
modify.o: $(hdrdir)/ruby/backward/2/bool.h
-modify.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
modify.o: $(hdrdir)/ruby/backward/2/inttypes.h
modify.o: $(hdrdir)/ruby/backward/2/limits.h
modify.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -1524,7 +1514,6 @@ new.o: $(hdrdir)/ruby/backward.h
new.o: $(hdrdir)/ruby/backward/2/assume.h
new.o: $(hdrdir)/ruby/backward/2/attributes.h
new.o: $(hdrdir)/ruby/backward/2/bool.h
-new.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
new.o: $(hdrdir)/ruby/backward/2/inttypes.h
new.o: $(hdrdir)/ruby/backward/2/limits.h
new.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -1696,7 +1685,6 @@ nofree.o: $(hdrdir)/ruby/backward.h
nofree.o: $(hdrdir)/ruby/backward/2/assume.h
nofree.o: $(hdrdir)/ruby/backward/2/attributes.h
nofree.o: $(hdrdir)/ruby/backward/2/bool.h
-nofree.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
nofree.o: $(hdrdir)/ruby/backward/2/inttypes.h
nofree.o: $(hdrdir)/ruby/backward/2/limits.h
nofree.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -1850,13 +1838,11 @@ nofree.o: $(hdrdir)/ruby/subst.h
nofree.o: nofree.c
normalize.o: $(RUBY_EXTCONF_H)
normalize.o: $(arch_hdrdir)/ruby/config.h
-normalize.o: $(hdrdir)/ruby.h
normalize.o: $(hdrdir)/ruby/assert.h
normalize.o: $(hdrdir)/ruby/backward.h
normalize.o: $(hdrdir)/ruby/backward/2/assume.h
normalize.o: $(hdrdir)/ruby/backward/2/attributes.h
normalize.o: $(hdrdir)/ruby/backward/2/bool.h
-normalize.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
normalize.o: $(hdrdir)/ruby/backward/2/inttypes.h
normalize.o: $(hdrdir)/ruby/backward/2/limits.h
normalize.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -2019,7 +2005,6 @@ normalize.o: $(hdrdir)/ruby/oniguruma.h
normalize.o: $(hdrdir)/ruby/ruby.h
normalize.o: $(hdrdir)/ruby/st.h
normalize.o: $(hdrdir)/ruby/subst.h
-normalize.o: $(top_srcdir)/internal.h
normalize.o: $(top_srcdir)/internal/file.h
normalize.o: normalize.c
qsort.o: $(RUBY_EXTCONF_H)
@@ -2030,7 +2015,6 @@ qsort.o: $(hdrdir)/ruby/backward.h
qsort.o: $(hdrdir)/ruby/backward/2/assume.h
qsort.o: $(hdrdir)/ruby/backward/2/attributes.h
qsort.o: $(hdrdir)/ruby/backward/2/bool.h
-qsort.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
qsort.o: $(hdrdir)/ruby/backward/2/inttypes.h
qsort.o: $(hdrdir)/ruby/backward/2/limits.h
qsort.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -2203,7 +2187,6 @@ rb_interned_str.o: $(hdrdir)/ruby/backward.h
rb_interned_str.o: $(hdrdir)/ruby/backward/2/assume.h
rb_interned_str.o: $(hdrdir)/ruby/backward/2/attributes.h
rb_interned_str.o: $(hdrdir)/ruby/backward/2/bool.h
-rb_interned_str.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
rb_interned_str.o: $(hdrdir)/ruby/backward/2/inttypes.h
rb_interned_str.o: $(hdrdir)/ruby/backward/2/limits.h
rb_interned_str.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -2363,7 +2346,6 @@ rb_str_dup.o: $(hdrdir)/ruby/backward.h
rb_str_dup.o: $(hdrdir)/ruby/backward/2/assume.h
rb_str_dup.o: $(hdrdir)/ruby/backward/2/attributes.h
rb_str_dup.o: $(hdrdir)/ruby/backward/2/bool.h
-rb_str_dup.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
rb_str_dup.o: $(hdrdir)/ruby/backward/2/inttypes.h
rb_str_dup.o: $(hdrdir)/ruby/backward/2/limits.h
rb_str_dup.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -2523,7 +2505,6 @@ set_len.o: $(hdrdir)/ruby/backward.h
set_len.o: $(hdrdir)/ruby/backward/2/assume.h
set_len.o: $(hdrdir)/ruby/backward/2/attributes.h
set_len.o: $(hdrdir)/ruby/backward/2/bool.h
-set_len.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
set_len.o: $(hdrdir)/ruby/backward/2/inttypes.h
set_len.o: $(hdrdir)/ruby/backward/2/limits.h
set_len.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/-test-/struct/depend b/ext/-test-/struct/depend
index aebf9a88b76..c9dcffd3c44 100644
--- a/ext/-test-/struct/depend
+++ b/ext/-test-/struct/depend
@@ -2,6 +2,18 @@
duplicate.o: $(RUBY_EXTCONF_H)
duplicate.o: $(arch_hdrdir)/ruby/config.h
duplicate.o: $(hdrdir)/ruby.h
+duplicate.o: $(hdrdir)/ruby/assert.h
+duplicate.o: $(hdrdir)/ruby/backward.h
+duplicate.o: $(hdrdir)/ruby/backward/2/assume.h
+duplicate.o: $(hdrdir)/ruby/backward/2/attributes.h
+duplicate.o: $(hdrdir)/ruby/backward/2/bool.h
+duplicate.o: $(hdrdir)/ruby/backward/2/inttypes.h
+duplicate.o: $(hdrdir)/ruby/backward/2/limits.h
+duplicate.o: $(hdrdir)/ruby/backward/2/long_long.h
+duplicate.o: $(hdrdir)/ruby/backward/2/stdalign.h
+duplicate.o: $(hdrdir)/ruby/backward/2/stdarg.h
+duplicate.o: $(hdrdir)/ruby/defines.h
+duplicate.o: $(hdrdir)/ruby/intern.h
duplicate.o: $(hdrdir)/ruby/internal/anyargs.h
duplicate.o: $(hdrdir)/ruby/internal/arithmetic.h
duplicate.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ duplicate.o: $(hdrdir)/ruby/internal/value_type.h
duplicate.o: $(hdrdir)/ruby/internal/variable.h
duplicate.o: $(hdrdir)/ruby/internal/warning_push.h
duplicate.o: $(hdrdir)/ruby/internal/xmalloc.h
-duplicate.o: $(hdrdir)/ruby/assert.h
-duplicate.o: $(hdrdir)/ruby/backward.h
-duplicate.o: $(hdrdir)/ruby/backward/2/assume.h
-duplicate.o: $(hdrdir)/ruby/backward/2/attributes.h
-duplicate.o: $(hdrdir)/ruby/backward/2/bool.h
-duplicate.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-duplicate.o: $(hdrdir)/ruby/backward/2/inttypes.h
-duplicate.o: $(hdrdir)/ruby/backward/2/limits.h
-duplicate.o: $(hdrdir)/ruby/backward/2/long_long.h
-duplicate.o: $(hdrdir)/ruby/backward/2/stdalign.h
-duplicate.o: $(hdrdir)/ruby/backward/2/stdarg.h
-duplicate.o: $(hdrdir)/ruby/defines.h
-duplicate.o: $(hdrdir)/ruby/intern.h
duplicate.o: $(hdrdir)/ruby/missing.h
duplicate.o: $(hdrdir)/ruby/ruby.h
duplicate.o: $(hdrdir)/ruby/st.h
@@ -162,6 +161,18 @@ duplicate.o: duplicate.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -301,19 +312,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -322,6 +320,18 @@ init.o: init.c
len.o: $(RUBY_EXTCONF_H)
len.o: $(arch_hdrdir)/ruby/config.h
len.o: $(hdrdir)/ruby.h
+len.o: $(hdrdir)/ruby/assert.h
+len.o: $(hdrdir)/ruby/backward.h
+len.o: $(hdrdir)/ruby/backward/2/assume.h
+len.o: $(hdrdir)/ruby/backward/2/attributes.h
+len.o: $(hdrdir)/ruby/backward/2/bool.h
+len.o: $(hdrdir)/ruby/backward/2/inttypes.h
+len.o: $(hdrdir)/ruby/backward/2/limits.h
+len.o: $(hdrdir)/ruby/backward/2/long_long.h
+len.o: $(hdrdir)/ruby/backward/2/stdalign.h
+len.o: $(hdrdir)/ruby/backward/2/stdarg.h
+len.o: $(hdrdir)/ruby/defines.h
+len.o: $(hdrdir)/ruby/intern.h
len.o: $(hdrdir)/ruby/internal/anyargs.h
len.o: $(hdrdir)/ruby/internal/arithmetic.h
len.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -461,19 +471,6 @@ len.o: $(hdrdir)/ruby/internal/value_type.h
len.o: $(hdrdir)/ruby/internal/variable.h
len.o: $(hdrdir)/ruby/internal/warning_push.h
len.o: $(hdrdir)/ruby/internal/xmalloc.h
-len.o: $(hdrdir)/ruby/assert.h
-len.o: $(hdrdir)/ruby/backward.h
-len.o: $(hdrdir)/ruby/backward/2/assume.h
-len.o: $(hdrdir)/ruby/backward/2/attributes.h
-len.o: $(hdrdir)/ruby/backward/2/bool.h
-len.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-len.o: $(hdrdir)/ruby/backward/2/inttypes.h
-len.o: $(hdrdir)/ruby/backward/2/limits.h
-len.o: $(hdrdir)/ruby/backward/2/long_long.h
-len.o: $(hdrdir)/ruby/backward/2/stdalign.h
-len.o: $(hdrdir)/ruby/backward/2/stdarg.h
-len.o: $(hdrdir)/ruby/defines.h
-len.o: $(hdrdir)/ruby/intern.h
len.o: $(hdrdir)/ruby/missing.h
len.o: $(hdrdir)/ruby/ruby.h
len.o: $(hdrdir)/ruby/st.h
@@ -482,6 +479,18 @@ len.o: len.c
member.o: $(RUBY_EXTCONF_H)
member.o: $(arch_hdrdir)/ruby/config.h
member.o: $(hdrdir)/ruby.h
+member.o: $(hdrdir)/ruby/assert.h
+member.o: $(hdrdir)/ruby/backward.h
+member.o: $(hdrdir)/ruby/backward/2/assume.h
+member.o: $(hdrdir)/ruby/backward/2/attributes.h
+member.o: $(hdrdir)/ruby/backward/2/bool.h
+member.o: $(hdrdir)/ruby/backward/2/inttypes.h
+member.o: $(hdrdir)/ruby/backward/2/limits.h
+member.o: $(hdrdir)/ruby/backward/2/long_long.h
+member.o: $(hdrdir)/ruby/backward/2/stdalign.h
+member.o: $(hdrdir)/ruby/backward/2/stdarg.h
+member.o: $(hdrdir)/ruby/defines.h
+member.o: $(hdrdir)/ruby/intern.h
member.o: $(hdrdir)/ruby/internal/anyargs.h
member.o: $(hdrdir)/ruby/internal/arithmetic.h
member.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -621,19 +630,6 @@ member.o: $(hdrdir)/ruby/internal/value_type.h
member.o: $(hdrdir)/ruby/internal/variable.h
member.o: $(hdrdir)/ruby/internal/warning_push.h
member.o: $(hdrdir)/ruby/internal/xmalloc.h
-member.o: $(hdrdir)/ruby/assert.h
-member.o: $(hdrdir)/ruby/backward.h
-member.o: $(hdrdir)/ruby/backward/2/assume.h
-member.o: $(hdrdir)/ruby/backward/2/attributes.h
-member.o: $(hdrdir)/ruby/backward/2/bool.h
-member.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-member.o: $(hdrdir)/ruby/backward/2/inttypes.h
-member.o: $(hdrdir)/ruby/backward/2/limits.h
-member.o: $(hdrdir)/ruby/backward/2/long_long.h
-member.o: $(hdrdir)/ruby/backward/2/stdalign.h
-member.o: $(hdrdir)/ruby/backward/2/stdarg.h
-member.o: $(hdrdir)/ruby/defines.h
-member.o: $(hdrdir)/ruby/intern.h
member.o: $(hdrdir)/ruby/missing.h
member.o: $(hdrdir)/ruby/ruby.h
member.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/symbol/depend b/ext/-test-/symbol/depend
index 9b75e866da3..f462855b409 100644
--- a/ext/-test-/symbol/depend
+++ b/ext/-test-/symbol/depend
@@ -2,6 +2,18 @@
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -162,6 +161,18 @@ init.o: init.c
type.o: $(RUBY_EXTCONF_H)
type.o: $(arch_hdrdir)/ruby/config.h
type.o: $(hdrdir)/ruby.h
+type.o: $(hdrdir)/ruby/assert.h
+type.o: $(hdrdir)/ruby/backward.h
+type.o: $(hdrdir)/ruby/backward/2/assume.h
+type.o: $(hdrdir)/ruby/backward/2/attributes.h
+type.o: $(hdrdir)/ruby/backward/2/bool.h
+type.o: $(hdrdir)/ruby/backward/2/inttypes.h
+type.o: $(hdrdir)/ruby/backward/2/limits.h
+type.o: $(hdrdir)/ruby/backward/2/long_long.h
+type.o: $(hdrdir)/ruby/backward/2/stdalign.h
+type.o: $(hdrdir)/ruby/backward/2/stdarg.h
+type.o: $(hdrdir)/ruby/defines.h
+type.o: $(hdrdir)/ruby/intern.h
type.o: $(hdrdir)/ruby/internal/anyargs.h
type.o: $(hdrdir)/ruby/internal/arithmetic.h
type.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -301,19 +312,6 @@ type.o: $(hdrdir)/ruby/internal/value_type.h
type.o: $(hdrdir)/ruby/internal/variable.h
type.o: $(hdrdir)/ruby/internal/warning_push.h
type.o: $(hdrdir)/ruby/internal/xmalloc.h
-type.o: $(hdrdir)/ruby/assert.h
-type.o: $(hdrdir)/ruby/backward.h
-type.o: $(hdrdir)/ruby/backward/2/assume.h
-type.o: $(hdrdir)/ruby/backward/2/attributes.h
-type.o: $(hdrdir)/ruby/backward/2/bool.h
-type.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-type.o: $(hdrdir)/ruby/backward/2/inttypes.h
-type.o: $(hdrdir)/ruby/backward/2/limits.h
-type.o: $(hdrdir)/ruby/backward/2/long_long.h
-type.o: $(hdrdir)/ruby/backward/2/stdalign.h
-type.o: $(hdrdir)/ruby/backward/2/stdarg.h
-type.o: $(hdrdir)/ruby/defines.h
-type.o: $(hdrdir)/ruby/intern.h
type.o: $(hdrdir)/ruby/missing.h
type.o: $(hdrdir)/ruby/ruby.h
type.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/thread_fd/depend b/ext/-test-/thread_fd/depend
index ad6f66f3123..0c8c31eac73 100644
--- a/ext/-test-/thread_fd/depend
+++ b/ext/-test-/thread_fd/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
thread_fd.o: $(RUBY_EXTCONF_H)
thread_fd.o: $(arch_hdrdir)/ruby/config.h
+thread_fd.o: $(hdrdir)/ruby/assert.h
+thread_fd.o: $(hdrdir)/ruby/backward.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/assume.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/attributes.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/bool.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/inttypes.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/limits.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/long_long.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/stdalign.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/stdarg.h
+thread_fd.o: $(hdrdir)/ruby/defines.h
+thread_fd.o: $(hdrdir)/ruby/intern.h
thread_fd.o: $(hdrdir)/ruby/internal/anyargs.h
thread_fd.o: $(hdrdir)/ruby/internal/arithmetic.h
thread_fd.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ thread_fd.o: $(hdrdir)/ruby/internal/value_type.h
thread_fd.o: $(hdrdir)/ruby/internal/variable.h
thread_fd.o: $(hdrdir)/ruby/internal/warning_push.h
thread_fd.o: $(hdrdir)/ruby/internal/xmalloc.h
-thread_fd.o: $(hdrdir)/ruby/assert.h
-thread_fd.o: $(hdrdir)/ruby/backward.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/assume.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/attributes.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/bool.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/inttypes.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/limits.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/long_long.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/stdalign.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/stdarg.h
-thread_fd.o: $(hdrdir)/ruby/defines.h
-thread_fd.o: $(hdrdir)/ruby/intern.h
thread_fd.o: $(hdrdir)/ruby/missing.h
thread_fd.o: $(hdrdir)/ruby/ruby.h
thread_fd.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/time/depend b/ext/-test-/time/depend
index 48b41dd678c..557f65af6bc 100644
--- a/ext/-test-/time/depend
+++ b/ext/-test-/time/depend
@@ -2,6 +2,18 @@
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -162,6 +161,19 @@ init.o: init.c
leap_second.o: $(RUBY_EXTCONF_H)
leap_second.o: $(arch_hdrdir)/ruby/config.h
leap_second.o: $(hdrdir)/ruby.h
+leap_second.o: $(hdrdir)/ruby/assert.h
+leap_second.o: $(hdrdir)/ruby/backward.h
+leap_second.o: $(hdrdir)/ruby/backward/2/assume.h
+leap_second.o: $(hdrdir)/ruby/backward/2/attributes.h
+leap_second.o: $(hdrdir)/ruby/backward/2/bool.h
+leap_second.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+leap_second.o: $(hdrdir)/ruby/backward/2/inttypes.h
+leap_second.o: $(hdrdir)/ruby/backward/2/limits.h
+leap_second.o: $(hdrdir)/ruby/backward/2/long_long.h
+leap_second.o: $(hdrdir)/ruby/backward/2/stdalign.h
+leap_second.o: $(hdrdir)/ruby/backward/2/stdarg.h
+leap_second.o: $(hdrdir)/ruby/defines.h
+leap_second.o: $(hdrdir)/ruby/intern.h
leap_second.o: $(hdrdir)/ruby/internal/anyargs.h
leap_second.o: $(hdrdir)/ruby/internal/arithmetic.h
leap_second.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -301,19 +313,6 @@ leap_second.o: $(hdrdir)/ruby/internal/value_type.h
leap_second.o: $(hdrdir)/ruby/internal/variable.h
leap_second.o: $(hdrdir)/ruby/internal/warning_push.h
leap_second.o: $(hdrdir)/ruby/internal/xmalloc.h
-leap_second.o: $(hdrdir)/ruby/assert.h
-leap_second.o: $(hdrdir)/ruby/backward.h
-leap_second.o: $(hdrdir)/ruby/backward/2/assume.h
-leap_second.o: $(hdrdir)/ruby/backward/2/attributes.h
-leap_second.o: $(hdrdir)/ruby/backward/2/bool.h
-leap_second.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-leap_second.o: $(hdrdir)/ruby/backward/2/inttypes.h
-leap_second.o: $(hdrdir)/ruby/backward/2/limits.h
-leap_second.o: $(hdrdir)/ruby/backward/2/long_long.h
-leap_second.o: $(hdrdir)/ruby/backward/2/stdalign.h
-leap_second.o: $(hdrdir)/ruby/backward/2/stdarg.h
-leap_second.o: $(hdrdir)/ruby/defines.h
-leap_second.o: $(hdrdir)/ruby/intern.h
leap_second.o: $(hdrdir)/ruby/missing.h
leap_second.o: $(hdrdir)/ruby/ruby.h
leap_second.o: $(hdrdir)/ruby/st.h
@@ -326,6 +325,18 @@ leap_second.o: leap_second.c
new.o: $(RUBY_EXTCONF_H)
new.o: $(arch_hdrdir)/ruby/config.h
new.o: $(hdrdir)/ruby.h
+new.o: $(hdrdir)/ruby/assert.h
+new.o: $(hdrdir)/ruby/backward.h
+new.o: $(hdrdir)/ruby/backward/2/assume.h
+new.o: $(hdrdir)/ruby/backward/2/attributes.h
+new.o: $(hdrdir)/ruby/backward/2/bool.h
+new.o: $(hdrdir)/ruby/backward/2/inttypes.h
+new.o: $(hdrdir)/ruby/backward/2/limits.h
+new.o: $(hdrdir)/ruby/backward/2/long_long.h
+new.o: $(hdrdir)/ruby/backward/2/stdalign.h
+new.o: $(hdrdir)/ruby/backward/2/stdarg.h
+new.o: $(hdrdir)/ruby/defines.h
+new.o: $(hdrdir)/ruby/intern.h
new.o: $(hdrdir)/ruby/internal/anyargs.h
new.o: $(hdrdir)/ruby/internal/arithmetic.h
new.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -465,19 +476,6 @@ new.o: $(hdrdir)/ruby/internal/value_type.h
new.o: $(hdrdir)/ruby/internal/variable.h
new.o: $(hdrdir)/ruby/internal/warning_push.h
new.o: $(hdrdir)/ruby/internal/xmalloc.h
-new.o: $(hdrdir)/ruby/assert.h
-new.o: $(hdrdir)/ruby/backward.h
-new.o: $(hdrdir)/ruby/backward/2/assume.h
-new.o: $(hdrdir)/ruby/backward/2/attributes.h
-new.o: $(hdrdir)/ruby/backward/2/bool.h
-new.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-new.o: $(hdrdir)/ruby/backward/2/inttypes.h
-new.o: $(hdrdir)/ruby/backward/2/limits.h
-new.o: $(hdrdir)/ruby/backward/2/long_long.h
-new.o: $(hdrdir)/ruby/backward/2/stdalign.h
-new.o: $(hdrdir)/ruby/backward/2/stdarg.h
-new.o: $(hdrdir)/ruby/defines.h
-new.o: $(hdrdir)/ruby/intern.h
new.o: $(hdrdir)/ruby/missing.h
new.o: $(hdrdir)/ruby/ruby.h
new.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/tracepoint/depend b/ext/-test-/tracepoint/depend
index dac1bb278e2..f05f13d08dd 100644
--- a/ext/-test-/tracepoint/depend
+++ b/ext/-test-/tracepoint/depend
@@ -1,6 +1,19 @@
# AUTOGENERATED DEPENDENCIES START
gc_hook.o: $(RUBY_EXTCONF_H)
gc_hook.o: $(arch_hdrdir)/ruby/config.h
+gc_hook.o: $(hdrdir)/ruby/assert.h
+gc_hook.o: $(hdrdir)/ruby/backward.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/assume.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/attributes.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/bool.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/inttypes.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/limits.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/long_long.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/stdalign.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/stdarg.h
+gc_hook.o: $(hdrdir)/ruby/debug.h
+gc_hook.o: $(hdrdir)/ruby/defines.h
+gc_hook.o: $(hdrdir)/ruby/intern.h
gc_hook.o: $(hdrdir)/ruby/internal/anyargs.h
gc_hook.o: $(hdrdir)/ruby/internal/arithmetic.h
gc_hook.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,20 +153,6 @@ gc_hook.o: $(hdrdir)/ruby/internal/value_type.h
gc_hook.o: $(hdrdir)/ruby/internal/variable.h
gc_hook.o: $(hdrdir)/ruby/internal/warning_push.h
gc_hook.o: $(hdrdir)/ruby/internal/xmalloc.h
-gc_hook.o: $(hdrdir)/ruby/assert.h
-gc_hook.o: $(hdrdir)/ruby/backward.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/assume.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/attributes.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/bool.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/inttypes.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/limits.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/long_long.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/stdalign.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/stdarg.h
-gc_hook.o: $(hdrdir)/ruby/debug.h
-gc_hook.o: $(hdrdir)/ruby/defines.h
-gc_hook.o: $(hdrdir)/ruby/intern.h
gc_hook.o: $(hdrdir)/ruby/missing.h
gc_hook.o: $(hdrdir)/ruby/ruby.h
gc_hook.o: $(hdrdir)/ruby/st.h
@@ -161,6 +160,19 @@ gc_hook.o: $(hdrdir)/ruby/subst.h
gc_hook.o: gc_hook.c
tracepoint.o: $(RUBY_EXTCONF_H)
tracepoint.o: $(arch_hdrdir)/ruby/config.h
+tracepoint.o: $(hdrdir)/ruby/assert.h
+tracepoint.o: $(hdrdir)/ruby/backward.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/assume.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/attributes.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/bool.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/inttypes.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/limits.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/long_long.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/stdalign.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/stdarg.h
+tracepoint.o: $(hdrdir)/ruby/debug.h
+tracepoint.o: $(hdrdir)/ruby/defines.h
+tracepoint.o: $(hdrdir)/ruby/intern.h
tracepoint.o: $(hdrdir)/ruby/internal/anyargs.h
tracepoint.o: $(hdrdir)/ruby/internal/arithmetic.h
tracepoint.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -300,20 +312,6 @@ tracepoint.o: $(hdrdir)/ruby/internal/value_type.h
tracepoint.o: $(hdrdir)/ruby/internal/variable.h
tracepoint.o: $(hdrdir)/ruby/internal/warning_push.h
tracepoint.o: $(hdrdir)/ruby/internal/xmalloc.h
-tracepoint.o: $(hdrdir)/ruby/assert.h
-tracepoint.o: $(hdrdir)/ruby/backward.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/assume.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/attributes.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/bool.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/inttypes.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/limits.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/long_long.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/stdalign.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/stdarg.h
-tracepoint.o: $(hdrdir)/ruby/debug.h
-tracepoint.o: $(hdrdir)/ruby/defines.h
-tracepoint.o: $(hdrdir)/ruby/intern.h
tracepoint.o: $(hdrdir)/ruby/missing.h
tracepoint.o: $(hdrdir)/ruby/ruby.h
tracepoint.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/typeddata/depend b/ext/-test-/typeddata/depend
index 6204fb05241..9eb0666c70c 100644
--- a/ext/-test-/typeddata/depend
+++ b/ext/-test-/typeddata/depend
@@ -2,6 +2,18 @@
typeddata.o: $(RUBY_EXTCONF_H)
typeddata.o: $(arch_hdrdir)/ruby/config.h
typeddata.o: $(hdrdir)/ruby.h
+typeddata.o: $(hdrdir)/ruby/assert.h
+typeddata.o: $(hdrdir)/ruby/backward.h
+typeddata.o: $(hdrdir)/ruby/backward/2/assume.h
+typeddata.o: $(hdrdir)/ruby/backward/2/attributes.h
+typeddata.o: $(hdrdir)/ruby/backward/2/bool.h
+typeddata.o: $(hdrdir)/ruby/backward/2/inttypes.h
+typeddata.o: $(hdrdir)/ruby/backward/2/limits.h
+typeddata.o: $(hdrdir)/ruby/backward/2/long_long.h
+typeddata.o: $(hdrdir)/ruby/backward/2/stdalign.h
+typeddata.o: $(hdrdir)/ruby/backward/2/stdarg.h
+typeddata.o: $(hdrdir)/ruby/defines.h
+typeddata.o: $(hdrdir)/ruby/intern.h
typeddata.o: $(hdrdir)/ruby/internal/anyargs.h
typeddata.o: $(hdrdir)/ruby/internal/arithmetic.h
typeddata.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ typeddata.o: $(hdrdir)/ruby/internal/value_type.h
typeddata.o: $(hdrdir)/ruby/internal/variable.h
typeddata.o: $(hdrdir)/ruby/internal/warning_push.h
typeddata.o: $(hdrdir)/ruby/internal/xmalloc.h
-typeddata.o: $(hdrdir)/ruby/assert.h
-typeddata.o: $(hdrdir)/ruby/backward.h
-typeddata.o: $(hdrdir)/ruby/backward/2/assume.h
-typeddata.o: $(hdrdir)/ruby/backward/2/attributes.h
-typeddata.o: $(hdrdir)/ruby/backward/2/bool.h
-typeddata.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-typeddata.o: $(hdrdir)/ruby/backward/2/inttypes.h
-typeddata.o: $(hdrdir)/ruby/backward/2/limits.h
-typeddata.o: $(hdrdir)/ruby/backward/2/long_long.h
-typeddata.o: $(hdrdir)/ruby/backward/2/stdalign.h
-typeddata.o: $(hdrdir)/ruby/backward/2/stdarg.h
-typeddata.o: $(hdrdir)/ruby/defines.h
-typeddata.o: $(hdrdir)/ruby/intern.h
typeddata.o: $(hdrdir)/ruby/missing.h
typeddata.o: $(hdrdir)/ruby/ruby.h
typeddata.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/vm/depend b/ext/-test-/vm/depend
index 6669e52d4c6..a01669802d5 100644
--- a/ext/-test-/vm/depend
+++ b/ext/-test-/vm/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
at_exit.o: $(RUBY_EXTCONF_H)
at_exit.o: $(arch_hdrdir)/ruby/config.h
+at_exit.o: $(hdrdir)/ruby/assert.h
+at_exit.o: $(hdrdir)/ruby/backward.h
+at_exit.o: $(hdrdir)/ruby/backward/2/assume.h
+at_exit.o: $(hdrdir)/ruby/backward/2/attributes.h
+at_exit.o: $(hdrdir)/ruby/backward/2/bool.h
+at_exit.o: $(hdrdir)/ruby/backward/2/inttypes.h
+at_exit.o: $(hdrdir)/ruby/backward/2/limits.h
+at_exit.o: $(hdrdir)/ruby/backward/2/long_long.h
+at_exit.o: $(hdrdir)/ruby/backward/2/stdalign.h
+at_exit.o: $(hdrdir)/ruby/backward/2/stdarg.h
+at_exit.o: $(hdrdir)/ruby/defines.h
+at_exit.o: $(hdrdir)/ruby/intern.h
at_exit.o: $(hdrdir)/ruby/internal/anyargs.h
at_exit.o: $(hdrdir)/ruby/internal/arithmetic.h
at_exit.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ at_exit.o: $(hdrdir)/ruby/internal/value_type.h
at_exit.o: $(hdrdir)/ruby/internal/variable.h
at_exit.o: $(hdrdir)/ruby/internal/warning_push.h
at_exit.o: $(hdrdir)/ruby/internal/xmalloc.h
-at_exit.o: $(hdrdir)/ruby/assert.h
-at_exit.o: $(hdrdir)/ruby/backward.h
-at_exit.o: $(hdrdir)/ruby/backward/2/assume.h
-at_exit.o: $(hdrdir)/ruby/backward/2/attributes.h
-at_exit.o: $(hdrdir)/ruby/backward/2/bool.h
-at_exit.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-at_exit.o: $(hdrdir)/ruby/backward/2/inttypes.h
-at_exit.o: $(hdrdir)/ruby/backward/2/limits.h
-at_exit.o: $(hdrdir)/ruby/backward/2/long_long.h
-at_exit.o: $(hdrdir)/ruby/backward/2/stdalign.h
-at_exit.o: $(hdrdir)/ruby/backward/2/stdarg.h
-at_exit.o: $(hdrdir)/ruby/defines.h
-at_exit.o: $(hdrdir)/ruby/intern.h
at_exit.o: $(hdrdir)/ruby/missing.h
at_exit.o: $(hdrdir)/ruby/ruby.h
at_exit.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/wait/depend b/ext/-test-/wait/depend
index f2999f3c51d..b5cdd128366 100644
--- a/ext/-test-/wait/depend
+++ b/ext/-test-/wait/depend
@@ -6,7 +6,6 @@ wait.o: $(hdrdir)/ruby/backward.h
wait.o: $(hdrdir)/ruby/backward/2/assume.h
wait.o: $(hdrdir)/ruby/backward/2/attributes.h
wait.o: $(hdrdir)/ruby/backward/2/bool.h
-wait.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
wait.o: $(hdrdir)/ruby/backward/2/inttypes.h
wait.o: $(hdrdir)/ruby/backward/2/limits.h
wait.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -171,167 +170,4 @@ wait.o: $(hdrdir)/ruby/ruby.h
wait.o: $(hdrdir)/ruby/st.h
wait.o: $(hdrdir)/ruby/subst.h
wait.o: wait.c
-wait_for_single_fd.o: $(RUBY_EXTCONF_H)
-wait_for_single_fd.o: $(arch_hdrdir)/ruby/config.h
-wait_for_single_fd.o: $(hdrdir)/ruby/assert.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/assume.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/attributes.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/bool.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/inttypes.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/limits.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/long_long.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/stdalign.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/stdarg.h
-wait_for_single_fd.o: $(hdrdir)/ruby/defines.h
-wait_for_single_fd.o: $(hdrdir)/ruby/encoding.h
-wait_for_single_fd.o: $(hdrdir)/ruby/intern.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/anyargs.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/char.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/double.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/int.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/long.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/short.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/assume.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/artificial.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/cold.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/const.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/constexpr.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/deprecated.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/error.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/forceinline.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/format.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/noalias.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/noexcept.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/noinline.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/nonnull.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/noreturn.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/pure.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/restrict.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/warning.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/weakref.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/cast.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/compiler_is.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/compiler_since.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/config.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/constant_p.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rarray.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rbasic.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rbignum.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rclass.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rdata.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rfile.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rhash.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/robject.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rregexp.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rstring.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rstruct.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/ctype.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/dllexport.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/dosish.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/error.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/eval.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/event.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/fl_type.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/gc.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/glob.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/globals.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/has/attribute.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/has/builtin.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/has/c_attribute.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/has/extension.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/has/feature.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/has/warning.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/array.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/bignum.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/class.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/compar.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/complex.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/cont.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/dir.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/enum.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/enumerator.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/error.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/eval.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/file.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/gc.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/hash.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/io.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/load.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/marshal.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/numeric.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/object.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/parse.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/proc.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/process.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/random.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/range.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/rational.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/re.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/ruby.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/select.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/signal.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/sprintf.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/string.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/struct.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/thread.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/time.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/variable.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/vm.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/interpreter.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/iterator.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/memory.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/method.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/module.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/newobj.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/rgengc.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/scan_args.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/special_consts.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/static_assert.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/stdalign.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/stdbool.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/symbol.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/value.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/value_type.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/variable.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/warning_push.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/xmalloc.h
-wait_for_single_fd.o: $(hdrdir)/ruby/io.h
-wait_for_single_fd.o: $(hdrdir)/ruby/missing.h
-wait_for_single_fd.o: $(hdrdir)/ruby/onigmo.h
-wait_for_single_fd.o: $(hdrdir)/ruby/oniguruma.h
-wait_for_single_fd.o: $(hdrdir)/ruby/ruby.h
-wait_for_single_fd.o: $(hdrdir)/ruby/st.h
-wait_for_single_fd.o: $(hdrdir)/ruby/subst.h
-wait_for_single_fd.o: wait_for_single_fd.c
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 65e7c864e2b..fc74c0be539 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -115,6 +115,8 @@ static ID id_half;
*/
static unsigned short VpGetException(void);
static void VpSetException(unsigned short f);
+static void VpCheckException(Real *p, bool always);
+static VALUE VpCheckGetValue(Real *p);
static void VpInternalRound(Real *c, size_t ixDigit, DECDIG vPrev, DECDIG v);
static int VpLimitRound(Real *c, size_t ixDigit);
static Real *VpCopy(Real *pv, Real const* const x);
@@ -165,27 +167,6 @@ is_kind_of_BigDecimal(VALUE const v)
return rb_typeddata_is_kind_of(v, &BigDecimal_data_type);
}
-static void
-VpCheckException(Real *p, bool always)
-{
- if (VpIsNaN(p)) {
- VpException(VP_EXCEPTION_NaN, "Computation results to 'NaN'(Not a Number)", always);
- }
- else if (VpIsPosInf(p)) {
- VpException(VP_EXCEPTION_INFINITY, "Computation results to 'Infinity'", always);
- }
- else if (VpIsNegInf(p)) {
- VpException(VP_EXCEPTION_INFINITY, "Computation results to '-Infinity'", always);
- }
-}
-
-static VALUE
-VpCheckGetValue(Real *p)
-{
- VpCheckException(p, false);
- return p->obj;
-}
-
NORETURN(static void cannot_be_coerced_into_BigDecimal(VALUE, VALUE));
static void
@@ -275,11 +256,13 @@ GetVpValue(VALUE v, int must)
}
/* call-seq:
- * BigDecimal.double_fig
+ * BigDecimal.double_fig -> integer
+ *
+ * Returns the number of digits a Float object is allowed to have;
+ * the result is system-dependent:
+ *
+ * BigDecimal.double_fig # => 16
*
- * The BigDecimal.double_fig class method returns the number of digits a
- * Float number is allowed to have. The result depends upon the CPU and OS
- * in use.
*/
static VALUE
BigDecimal_double_fig(VALUE self)
@@ -288,7 +271,7 @@ BigDecimal_double_fig(VALUE self)
}
/* call-seq:
- * big_decimal.precs -> array
+ * precs -> array
*
* Returns an Array of two Integer values that represent platform-dependent
* internal storage properties.
@@ -298,7 +281,6 @@ BigDecimal_double_fig(VALUE self)
* significant digits in scientific notation, and BigDecimal#precision for
* obtaining the number of digits in decimal notation.
*
- * BigDecimal('5').precs #=> [9, 18]
*/
static VALUE
@@ -318,73 +300,202 @@ BigDecimal_prec(VALUE self)
return obj;
}
-/*
- * call-seq:
- * big_decimal.precision -> intreger
- *
- * Returns the number of decimal digits in this number.
- *
- * Example:
- *
- * BigDecimal("0").precision # => 0
- * BigDecimal("1").precision # => 1
- * BigDecimal("-1e20").precision # => 21
- * BigDecimal("1e-20").precision # => 20
- * BigDecimal("Infinity").precision # => 0
- * BigDecimal("-Infinity").precision # => 0
- * BigDecimal("NaN").precision # => 0
- */
-static VALUE
-BigDecimal_precision(VALUE self)
+static void
+BigDecimal_count_precision_and_scale(VALUE self, ssize_t *out_precision, ssize_t *out_scale)
{
ENTER(1);
+ if (out_precision == NULL && out_scale == NULL)
+ return;
+
Real *p;
GUARD_OBJ(p, GetVpValue(self, 1));
+ if (VpIsZero(p) || !VpIsDef(p)) {
+ zero:
+ if (out_precision) *out_precision = 0;
+ if (out_scale) *out_scale = 0;
+ return;
+ }
+
+ DECDIG x;
+
+ ssize_t n = p->Prec; /* The length of frac without zeros. */
+ while (n > 0 && p->frac[n-1] == 0) --n;
+ if (n == 0) goto zero;
+
+ int nlz = BASE_FIG;
+ for (x = p->frac[0]; x > 0; x /= 10) --nlz;
+
+ int ntz = 0;
+ for (x = p->frac[n-1]; x > 0 && x % 10 == 0; x /= 10) ++ntz;
/*
- * The most significant digit is frac[0], and the least significant digit is frac[Prec-1].
- * When the exponent is zero, the decimal point is located just before frac[0].
+ * Calculate the precision and the scale
+ * -------------------------------------
+ *
+ * The most significant digit is frac[0], and the least significant digit
+ * is frac[Prec-1]. When the exponent is zero, the decimal point is
+ * located just before frac[0].
+ *
* When the exponent is negative, the decimal point moves to leftward.
- * Conversely, when the exponent is positive, the decimal point moves to rightward.
+ * In this case, the precision can be calculated by
+ *
+ * precision = BASE_FIG * (-exponent + n) - ntz,
+ *
+ * and the scale is the same as precision.
+ *
+ * 0 . 0000 0000 | frac[0] ... frac[n-1] |
+ * |<----------| exponent == -2 |
+ * |---------------------------------->| precision
+ * |---------------------------------->| scale
+ *
+ *
+ * Conversely, when the exponent is positive, the decimal point moves to
+ * rightward. In this case, the scale equals to
+ *
+ * BASE_FIG * (n - exponent) - ntz.
*
- * | frac[0] frac[1] frac[2] . frac[3] frac[4] ... frac[Prec-1]
- * |------------------------> exponent == 3
+ * the precision equals to
+ *
+ * scale + BASE_FIG * exponent - nlz.
+ *
+ * | frac[0] frac[1] . frac[2] ... frac[n-1] |
+ * |---------------->| exponent == 2 |
+ * | |---------------------->| scale
+ * |---------------------------------------->| precision
*/
ssize_t ex = p->exponent;
- ssize_t precision = 0;
+
+ /* Count the number of decimal digits before frac[1]. */
+ ssize_t n_digits_head = BASE_FIG;
if (ex < 0) {
- precision = (-ex + 1) * BASE_FIG; /* 1 is for p->frac[0] */
- ex = 0;
+ n_digits_head += (-ex) * BASE_FIG; /* The number of leading zeros before frac[0]. */
+ ex = 0;
}
- else if (p->Prec > 0) {
- DECDIG x = p->frac[0];
- for (precision = 0; x > 0; x /= 10) {
- ++precision;
- }
+ else if (ex > 0) {
+ /* Count the number of decimal digits without the leading zeros in
+ * the most significant digit in the integral part.
+ */
+ n_digits_head -= nlz; /* Make the number of digits */
}
- if (ex > (ssize_t)p->Prec) {
- precision += (ex - 1) * BASE_FIG;
+ if (out_precision) {
+ ssize_t precision = n_digits_head;
+
+ /* Count the number of decimal digits after frac[0]. */
+ if (ex > (ssize_t)n) {
+ /* In this case the number is an integer with some trailing zeros. */
+ precision += (ex - 1) * BASE_FIG;
+ }
+ else if (n > 0) {
+ precision += (n - 1) * BASE_FIG;
+
+ if (ex < (ssize_t)n) {
+ precision -= ntz;
+ }
+ }
+
+ *out_precision = precision;
}
- else if (p->Prec > 0) {
- ssize_t n = (ssize_t)p->Prec - 1;
- while (n > 0 && p->frac[n] == 0) --n;
- precision += n * BASE_FIG;
+ if (out_scale) {
+ ssize_t scale = 0;
- if (ex < (ssize_t)p->Prec) {
- DECDIG x = p->frac[n];
- for (; x > 0 && x % 10 == 0; x /= 10) {
- --precision;
- }
+ if (p->exponent < 0) {
+ scale = n_digits_head + (n - 1) * BASE_FIG - ntz;
}
+ else if (n > p->exponent) {
+ scale = (n - p->exponent) * BASE_FIG - ntz;
+ }
+
+ *out_scale = scale;
}
+}
+/*
+ * call-seq:
+ * precision -> integer
+ *
+ * Returns the number of decimal digits in +self+:
+ *
+ * BigDecimal("0").precision # => 0
+ * BigDecimal("1").precision # => 1
+ * BigDecimal("1.1").precision # => 2
+ * BigDecimal("3.1415").precision # => 5
+ * BigDecimal("-1e20").precision # => 21
+ * BigDecimal("1e-20").precision # => 20
+ * BigDecimal("Infinity").precision # => 0
+ * BigDecimal("-Infinity").precision # => 0
+ * BigDecimal("NaN").precision # => 0
+ *
+ */
+static VALUE
+BigDecimal_precision(VALUE self)
+{
+ ssize_t precision;
+ BigDecimal_count_precision_and_scale(self, &precision, NULL);
return SSIZET2NUM(precision);
}
+/*
+ * call-seq:
+ * scale -> integer
+ *
+ * Returns the number of decimal digits following the decimal digits in +self+.
+ *
+ * BigDecimal("0").scale # => 0
+ * BigDecimal("1").scale # => 1
+ * BigDecimal("1.1").scale # => 1
+ * BigDecimal("3.1415").scale # => 4
+ * BigDecimal("-1e20").precision # => 0
+ * BigDecimal("1e-20").precision # => 20
+ * BigDecimal("Infinity").scale # => 0
+ * BigDecimal("-Infinity").scale # => 0
+ * BigDecimal("NaN").scale # => 0
+ */
+static VALUE
+BigDecimal_scale(VALUE self)
+{
+ ssize_t scale;
+ BigDecimal_count_precision_and_scale(self, NULL, &scale);
+ return SSIZET2NUM(scale);
+}
+
+/*
+ * call-seq:
+ * precision_scale -> [integer, integer]
+ *
+ * Returns a 2-length array; the first item is the result of
+ * BigDecimal#precision and the second one is of BigDecimal#scale.
+ *
+ * See BigDecimal#precision.
+ * See BigDecimal#scale.
+ */
+static VALUE
+BigDecimal_precision_scale(VALUE self)
+{
+ ssize_t precision, scale;
+ BigDecimal_count_precision_and_scale(self, &precision, &scale);
+ return rb_assoc_new(SSIZET2NUM(precision), SSIZET2NUM(scale));
+}
+
+/*
+ * call-seq:
+ * n_significant_digits -> integer
+ *
+ * Returns the number of decimal significant digits in +self+.
+ *
+ * BigDecimal("0").scale # => 0
+ * BigDecimal("1").scale # => 1
+ * BigDecimal("1.1").scale # => 2
+ * BigDecimal("3.1415").scale # => 5
+ * BigDecimal("-1e20").precision # => 1
+ * BigDecimal("1e-20").precision # => 1
+ * BigDecimal("Infinity").scale # => 0
+ * BigDecimal("-Infinity").scale # => 0
+ * BigDecimal("NaN").scale # => 0
+ */
static VALUE
BigDecimal_n_significant_digits(VALUE self)
{
@@ -392,32 +503,38 @@ BigDecimal_n_significant_digits(VALUE self)
Real *p;
GUARD_OBJ(p, GetVpValue(self, 1));
-
- ssize_t n = p->Prec;
- while (n > 0 && p->frac[n-1] == 0) --n;
- if (n <= 0) {
+ if (VpIsZero(p) || !VpIsDef(p)) {
return INT2FIX(0);
}
- int nlz, ntz;
+ ssize_t n = p->Prec; /* The length of frac without trailing zeros. */
+ for (n = p->Prec; n > 0 && p->frac[n-1] == 0; --n);
+ if (n == 0) return INT2FIX(0);
- DECDIG x = p->frac[0];
- for (nlz = BASE_FIG; x > 0; x /= 10) --nlz;
+ DECDIG x;
+ int nlz = BASE_FIG;
+ for (x = p->frac[0]; x > 0; x /= 10) --nlz;
- x = p->frac[n-1];
- for (ntz = 0; x > 0 && x % 10 == 0; x /= 10) ++ntz;
+ int ntz = 0;
+ for (x = p->frac[n-1]; x > 0 && x % 10 == 0; x /= 10) ++ntz;
- ssize_t n_digits = BASE_FIG * n - nlz - ntz;
- return SSIZET2NUM(n_digits);
+ ssize_t n_significant_digits = BASE_FIG*n - nlz - ntz;
+ return SSIZET2NUM(n_significant_digits);
}
/*
- * call-seq: hash
+ * call-seq:
+ * hash -> integer
+ *
+ * Returns the integer hash value for +self+.
+ *
+ * Two instances of \BigDecimal have the same hash value if and only if
+ * they have equal:
*
- * Creates a hash for this BigDecimal.
+ * - Sign.
+ * - Fractional part.
+ * - Exponent.
*
- * Two BigDecimals with equal sign,
- * fractional part and exponent have the same hash.
*/
static VALUE
BigDecimal_hash(VALUE self)
@@ -437,16 +554,16 @@ BigDecimal_hash(VALUE self)
}
/*
- * call-seq: _dump
+ * call-seq:
+ * _dump -> string
*
- * Method used to provide marshalling support.
+ * Returns a string representing the marshalling of +self+.
+ * See module Marshal.
*
- * inf = BigDecimal('Infinity')
- * #=> Infinity
- * BigDecimal._load(inf._dump)
- * #=> Infinity
+ * inf = BigDecimal('Infinity') # => Infinity
+ * dumped = inf._dump # => "9:Infinity"
+ * BigDecimal._load(dumped) # => Infinity
*
- * See the Marshal module.
*/
static VALUE
BigDecimal_dump(int argc, VALUE *argv, VALUE self)
@@ -580,42 +697,166 @@ check_rounding_mode(VALUE const v)
return sw;
}
-/* call-seq:
- * BigDecimal.mode(mode, value)
- *
- * Controls handling of arithmetic exceptions and rounding. If no value
- * is supplied, the current value is returned.
- *
- * Six values of the mode parameter control the handling of arithmetic
- * exceptions:
- *
- * BigDecimal::EXCEPTION_NaN
- * BigDecimal::EXCEPTION_INFINITY
- * BigDecimal::EXCEPTION_UNDERFLOW
- * BigDecimal::EXCEPTION_OVERFLOW
- * BigDecimal::EXCEPTION_ZERODIVIDE
- * BigDecimal::EXCEPTION_ALL
- *
- * For each mode parameter above, if the value set is false, computation
- * continues after an arithmetic exception of the appropriate type.
- * When computation continues, results are as follows:
- *
- * EXCEPTION_NaN:: NaN
- * EXCEPTION_INFINITY:: +Infinity or -Infinity
- * EXCEPTION_UNDERFLOW:: 0
- * EXCEPTION_OVERFLOW:: +Infinity or -Infinity
- * EXCEPTION_ZERODIVIDE:: +Infinity or -Infinity
- *
- * One value of the mode parameter controls the rounding of numeric values:
- * BigDecimal::ROUND_MODE. The values it can take are:
- *
- * ROUND_UP, :up:: round away from zero
- * ROUND_DOWN, :down, :truncate:: round towards zero (truncate)
- * ROUND_HALF_UP, :half_up, :default:: round towards the nearest neighbor, unless both neighbors are equidistant, in which case round away from zero. (default)
- * ROUND_HALF_DOWN, :half_down:: round towards the nearest neighbor, unless both neighbors are equidistant, in which case round towards zero.
- * ROUND_HALF_EVEN, :half_even, :banker:: round towards the nearest neighbor, unless both neighbors are equidistant, in which case round towards the even neighbor (Banker's rounding)
- * ROUND_CEILING, :ceiling, :ceil:: round towards positive infinity (ceil)
- * ROUND_FLOOR, :floor:: round towards negative infinity (floor)
+/* call-seq:
+ * BigDecimal.mode(mode, setting = nil) -> integer
+ *
+ * Returns an integer representing the mode settings
+ * for exception handling and rounding.
+ *
+ * These modes control exception handling:
+ *
+ * - \BigDecimal::EXCEPTION_NaN.
+ * - \BigDecimal::EXCEPTION_INFINITY.
+ * - \BigDecimal::EXCEPTION_UNDERFLOW.
+ * - \BigDecimal::EXCEPTION_OVERFLOW.
+ * - \BigDecimal::EXCEPTION_ZERODIVIDE.
+ * - \BigDecimal::EXCEPTION_ALL.
+ *
+ * Values for +setting+ for exception handling:
+ *
+ * - +true+: sets the given +mode+ to +true+.
+ * - +false+: sets the given +mode+ to +false+.
+ * - +nil+: does not modify the mode settings.
+ *
+ * You can use method BigDecimal.save_exception_mode
+ * to temporarily change, and then automatically restore, exception modes.
+ *
+ * For clarity, some examples below begin by setting all
+ * exception modes to +false+.
+ *
+ * This mode controls the way rounding is to be performed:
+ *
+ * - \BigDecimal::ROUND_MODE
+ *
+ * You can use method BigDecimal.save_rounding_mode
+ * to temporarily change, and then automatically restore, the rounding mode.
+ *
+ * <b>NaNs</b>
+ *
+ * Mode \BigDecimal::EXCEPTION_NaN controls behavior
+ * when a \BigDecimal NaN is created.
+ *
+ * Settings:
+ *
+ * - +false+ (default): Returns <tt>BigDecimal('NaN')</tt>.
+ * - +true+: Raises FloatDomainError.
+ *
+ * Examples:
+ *
+ * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0
+ * BigDecimal('NaN') # => NaN
+ * BigDecimal.mode(BigDecimal::EXCEPTION_NaN, true) # => 2
+ * BigDecimal('NaN') # Raises FloatDomainError
+ *
+ * <b>Infinities</b>
+ *
+ * Mode \BigDecimal::EXCEPTION_INFINITY controls behavior
+ * when a \BigDecimal Infinity or -Infinity is created.
+ * Settings:
+ *
+ * - +false+ (default): Returns <tt>BigDecimal('Infinity')</tt>
+ * or <tt>BigDecimal('-Infinity')</tt>.
+ * - +true+: Raises FloatDomainError.
+ *
+ * Examples:
+ *
+ * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0
+ * BigDecimal('Infinity') # => Infinity
+ * BigDecimal('-Infinity') # => -Infinity
+ * BigDecimal.mode(BigDecimal::EXCEPTION_INFINITY, true) # => 1
+ * BigDecimal('Infinity') # Raises FloatDomainError
+ * BigDecimal('-Infinity') # Raises FloatDomainError
+ *
+ * <b>Underflow</b>
+ *
+ * Mode \BigDecimal::EXCEPTION_UNDERFLOW controls behavior
+ * when a \BigDecimal underflow occurs.
+ * Settings:
+ *
+ * - +false+ (default): Returns <tt>BigDecimal('0')</tt>
+ * or <tt>BigDecimal('-Infinity')</tt>.
+ * - +true+: Raises FloatDomainError.
+ *
+ * Examples:
+ *
+ * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0
+ * def flow_under
+ * x = BigDecimal('0.1')
+ * 100.times { x *= x }
+ * end
+ * flow_under # => 100
+ * BigDecimal.mode(BigDecimal::EXCEPTION_UNDERFLOW, true) # => 4
+ * flow_under # Raises FloatDomainError
+ *
+ * <b>Overflow</b>
+ *
+ * Mode \BigDecimal::EXCEPTION_OVERFLOW controls behavior
+ * when a \BigDecimal overflow occurs.
+ * Settings:
+ *
+ * - +false+ (default): Returns <tt>BigDecimal('Infinity')</tt>
+ * or <tt>BigDecimal('-Infinity')</tt>.
+ * - +true+: Raises FloatDomainError.
+ *
+ * Examples:
+ *
+ * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0
+ * def flow_over
+ * x = BigDecimal('10')
+ * 100.times { x *= x }
+ * end
+ * flow_over # => 100
+ * BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, true) # => 1
+ * flow_over # Raises FloatDomainError
+ *
+ * <b>Zero Division</b>
+ *
+ * Mode \BigDecimal::EXCEPTION_ZERODIVIDE controls behavior
+ * when a zero-division occurs.
+ * Settings:
+ *
+ * - +false+ (default): Returns <tt>BigDecimal('Infinity')</tt>
+ * or <tt>BigDecimal('-Infinity')</tt>.
+ * - +true+: Raises FloatDomainError.
+ *
+ * Examples:
+ *
+ * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0
+ * one = BigDecimal('1')
+ * zero = BigDecimal('0')
+ * one / zero # => Infinity
+ * BigDecimal.mode(BigDecimal::EXCEPTION_ZERODIVIDE, true) # => 16
+ * one / zero # Raises FloatDomainError
+ *
+ * <b>All Exceptions</b>
+ *
+ * Mode \BigDecimal::EXCEPTION_ALL controls all of the above:
+ *
+ * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0
+ * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, true) # => 23
+ *
+ * <b>Rounding</b>
+ *
+ * Mode \BigDecimal::ROUND_MODE controls the way rounding is to be performed;
+ * its +setting+ values are:
+ *
+ * - +ROUND_UP+: Round away from zero.
+ * Aliased as +:up+.
+ * - +ROUND_DOWN+: Round toward zero.
+ * Aliased as +:down+ and +:truncate+.
+ * - +ROUND_HALF_UP+: Round toward the nearest neighbor;
+ * if the neighbors are equidistant, round away from zero.
+ * Aliased as +:half_up+ and +:default+.
+ * - +ROUND_HALF_DOWN+: Round toward the nearest neighbor;
+ * if the neighbors are equidistant, round toward zero.
+ * Aliased as +:half_down+.
+ * - +ROUND_HALF_EVEN+ (Banker's rounding): Round toward the nearest neighbor;
+ * if the neighbors are equidistant, round toward the even neighbor.
+ * Aliased as +:half_even+ and +:banker+.
+ * - +ROUND_CEILING+: Round toward positive infinity.
+ * Aliased as +:ceiling+ and +:ceil+.
+ * - +ROUND_FLOOR+: Round toward negative infinity.
+ * Aliased as +:floor:+.
*
*/
static VALUE
@@ -739,7 +980,18 @@ VpCreateRbObject(size_t mx, const char *str, bool raise_exception)
}
#define VpAllocReal(prec) (Real *)VpMemAlloc(offsetof(Real, frac) + (prec) * sizeof(DECDIG))
-#define VpReallocReal(ptr, prec) (Real *)VpMemRealloc((ptr), offsetof(Real, frac) + (prec) * sizeof(DECDIG))
+
+static Real *
+VpReallocReal(Real *pv, size_t prec)
+{
+ VALUE obj = pv ? pv->obj : 0;
+ Real *new_pv = (Real *)VpMemRealloc(pv, offsetof(Real, frac) + prec * sizeof(DECDIG));
+ if (obj) {
+ new_pv->obj = 0;
+ BigDecimal_wrap_struct(obj, new_pv);
+ }
+ return new_pv;
+}
static Real *
VpCopy(Real *pv, Real const* const x)
@@ -966,12 +1218,14 @@ BigDecimal_coerce(VALUE self, VALUE other)
}
/*
- * call-seq:
- * +big_decimal -> big_decimal
+ * call-seq:
+ * +big_decimal -> self
*
- * Return self.
+ * Returns +self+:
+ *
+ * +BigDecimal(5) # => 0.5e1
+ * +BigDecimal(-5) # => -0.5e1
*
- * +BigDecimal('5') #=> 0.5e1
*/
static VALUE
@@ -981,22 +1235,21 @@ BigDecimal_uplus(VALUE self)
}
/*
- * Document-method: BigDecimal#add
- * Document-method: BigDecimal#+
+ * call-seq:
+ * self + value -> bigdecimal
*
- * call-seq:
- * add(value, digits)
+ * Returns the \BigDecimal sum of +self+ and +value+:
*
- * Add the specified value.
+ * b = BigDecimal('111111.111') # => 0.111111111e6
+ * b + 2 # => 0.111113111e6
+ * b + 2.0 # => 0.111113111e6
+ * b + Rational(2, 1) # => 0.111113111e6
+ * b + Complex(2, 0) # => (0.111113111e6+0i)
*
- * e.g.
- * c = a.add(b,n)
- * c = a + b
+ * See the {Note About Precision}[BigDecimal.html#class-BigDecimal-label-A+Note+About+Precision].
*
- * digits:: If specified and less than the number of significant digits of the
- * result, the result is rounded to that number of digits, according
- * to BigDecimal.mode.
*/
+
static VALUE
BigDecimal_add(VALUE self, VALUE r)
{
@@ -1038,21 +1291,18 @@ BigDecimal_add(VALUE self, VALUE r)
return VpCheckGetValue(c);
}
- /* call-seq:
- * a - b -> bigdecimal
- *
- * Subtract the specified value.
- *
- * e.g.
- * c = a - b
+ /* call-seq:
+ * self - value -> bigdecimal
*
- * The precision of the result value depends on the type of +b+.
+ * Returns the \BigDecimal difference of +self+ and +value+:
*
- * If +b+ is a Float, the precision of the result is Float::DIG+1.
+ * b = BigDecimal('333333.333') # => 0.333333333e6
+ * b - 2 # => 0.333331333e6
+ * b - 2.0 # => 0.333331333e6
+ * b - Rational(2, 1) # => 0.333331333e6
+ * b - Complex(2, 0) # => (0.333331333e6+0i)
*
- * If +b+ is a BigDecimal, the precision of the result is +b+'s precision of
- * internal representation from platform. So, it's return value is platform
- * dependent.
+ * See the {Note About Precision}[BigDecimal.html#class-BigDecimal-label-A+Note+About+Precision].
*
*/
static VALUE
@@ -1231,12 +1481,19 @@ BigDecimal_eq(VALUE self, VALUE r)
return BigDecimalCmp(self, r, '=');
}
-/* call-seq:
- * a < b
+/* call-seq:
+ * self < other -> true or false
+ *
+ * Returns +true+ if +self+ is less than +other+, +false+ otherwise:
+ *
+ * b = BigDecimal('1.5') # => 0.15e1
+ * b < 2 # => true
+ * b < 2.0 # => true
+ * b < Rational(2, 1) # => true
+ * b < 1.5 # => false
*
- * Returns true if a is less than b.
+ * Raises an exception if the comparison cannot be made.
*
- * Values may be coerced to perform the comparison (see ==, BigDecimal#coerce).
*/
static VALUE
BigDecimal_lt(VALUE self, VALUE r)
@@ -1244,12 +1501,20 @@ BigDecimal_lt(VALUE self, VALUE r)
return BigDecimalCmp(self, r, '<');
}
-/* call-seq:
- * a <= b
+/* call-seq:
+ * self <= other -> true or false
+ *
+ * Returns +true+ if +self+ is less or equal to than +other+, +false+ otherwise:
*
- * Returns true if a is less than or equal to b.
+ * b = BigDecimal('1.5') # => 0.15e1
+ * b <= 2 # => true
+ * b <= 2.0 # => true
+ * b <= Rational(2, 1) # => true
+ * b <= 1.5 # => true
+ * b < 1 # => false
+ *
+ * Raises an exception if the comparison cannot be made.
*
- * Values may be coerced to perform the comparison (see ==, BigDecimal#coerce).
*/
static VALUE
BigDecimal_le(VALUE self, VALUE r)
@@ -1257,12 +1522,19 @@ BigDecimal_le(VALUE self, VALUE r)
return BigDecimalCmp(self, r, 'L');
}
-/* call-seq:
- * a > b
+/* call-seq:
+ * self > other -> true or false
+ *
+ * Returns +true+ if +self+ is greater than +other+, +false+ otherwise:
*
- * Returns true if a is greater than b.
+ * b = BigDecimal('1.5')
+ * b > 1 # => true
+ * b > 1.0 # => true
+ * b > Rational(1, 1) # => true
+ * b > 2 # => false
+ *
+ * Raises an exception if the comparison cannot be made.
*
- * Values may be coerced to perform the comparison (see ==, BigDecimal#coerce).
*/
static VALUE
BigDecimal_gt(VALUE self, VALUE r)
@@ -1270,12 +1542,20 @@ BigDecimal_gt(VALUE self, VALUE r)
return BigDecimalCmp(self, r, '>');
}
-/* call-seq:
- * a >= b
+/* call-seq:
+ * self >= other -> true or false
+ *
+ * Returns +true+ if +self+ is greater than or equal to +other+, +false+ otherwise:
*
- * Returns true if a is greater than or equal to b.
+ * b = BigDecimal('1.5')
+ * b >= 1 # => true
+ * b >= 1.0 # => true
+ * b >= Rational(1, 1) # => true
+ * b >= 1.5 # => true
+ * b > 2 # => false
+ *
+ * Raises an exception if the comparison cannot be made.
*
- * Values may be coerced to perform the comparison (see ==, BigDecimal#coerce)
*/
static VALUE
BigDecimal_ge(VALUE self, VALUE r)
@@ -1285,11 +1565,14 @@ BigDecimal_ge(VALUE self, VALUE r)
/*
* call-seq:
- * -big_decimal -> big_decimal
+ * -self -> bigdecimal
+ *
+ * Returns the \BigDecimal negation of self:
*
- * Return the negation of self.
+ * b0 = BigDecimal('1.5')
+ * b1 = -b0 # => -0.15e1
+ * b2 = -b1 # => 0.15e1
*
- * -BigDecimal('5') #=> -0.5e1
*/
static VALUE
@@ -1303,21 +1586,6 @@ BigDecimal_neg(VALUE self)
return VpCheckGetValue(c);
}
- /*
- * Document-method: BigDecimal#mult
- *
- * call-seq: mult(value, digits)
- *
- * Multiply by the specified value.
- *
- * e.g.
- * c = a.mult(b,n)
- * c = a * b
- *
- * digits:: If specified and less than the number of significant digits of the
- * result, the result is rounded to that number of digits, according
- * to BigDecimal.mode.
- */
static VALUE
BigDecimal_mult(VALUE self, VALUE r)
{
@@ -1351,6 +1619,7 @@ BigDecimal_divide(VALUE self, VALUE r, Real **c, Real **res, Real **div)
{
ENTER(5);
Real *a, *b;
+ ssize_t a_prec, b_prec;
size_t mx;
TypedData_Get_Struct(self, Real, &BigDecimal_data_type, a);
@@ -1376,26 +1645,35 @@ BigDecimal_divide(VALUE self, VALUE r, Real **c, Real **res, Real **div)
TypedData_Get_Struct(rr, Real, &BigDecimal_data_type, b);
SAVE(b);
-
*div = b;
- mx = a->Prec + vabs(a->exponent);
- if (mx < b->Prec + vabs(b->exponent)) mx = b->Prec + vabs(b->exponent);
- mx++; /* NOTE: An additional digit is needed for the compatibility to
- the version 1.2.1 and the former. */
- mx = (mx + 1) * VpBaseFig();
- GUARD_OBJ((*c), VpCreateRbObject(mx, "#0", true));
- GUARD_OBJ((*res), VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0", true));
+
+ BigDecimal_count_precision_and_scale(self, &a_prec, NULL);
+ BigDecimal_count_precision_and_scale(rr, &b_prec, NULL);
+ mx = (a_prec > b_prec) ? a_prec : b_prec;
+ mx *= 2;
+
+ if (2*BIGDECIMAL_DOUBLE_FIGURES > mx)
+ mx = 2*BIGDECIMAL_DOUBLE_FIGURES;
+
+ GUARD_OBJ((*c), VpCreateRbObject(mx + 2*BASE_FIG, "#0", true));
+ GUARD_OBJ((*res), VpCreateRbObject((mx + 1)*2 + 2*BASE_FIG, "#0", true));
VpDivd(*c, *res, a, b);
+
return Qnil;
}
+static VALUE BigDecimal_DoDivmod(VALUE self, VALUE r, Real **div, Real **mod);
+
/* call-seq:
- * a / b -> bigdecimal
- * quo(value) -> bigdecimal
+ * a / b -> bigdecimal
*
* Divide by the specified value.
*
+ * The result precision will be the precision of the larger operand,
+ * but its minimum is 2*Float::DIG.
+ *
* See BigDecimal#div.
+ * See BigDecimal#quo.
*/
static VALUE
BigDecimal_div(VALUE self, VALUE r)
@@ -1417,6 +1695,45 @@ BigDecimal_div(VALUE self, VALUE r)
return VpCheckGetValue(c);
}
+static VALUE BigDecimal_round(int argc, VALUE *argv, VALUE self);
+
+/* call-seq:
+ * quo(value) -> bigdecimal
+ * quo(value, digits) -> bigdecimal
+ *
+ * Divide by the specified value.
+ *
+ * digits:: If specified and less than the number of significant digits of
+ * the result, the result is rounded to the given number of digits,
+ * according to the rounding mode indicated by BigDecimal.mode.
+ *
+ * If digits is 0 or omitted, the result is the same as for the
+ * / operator.
+ *
+ * See BigDecimal#/.
+ * See BigDecimal#div.
+ */
+static VALUE
+BigDecimal_quo(int argc, VALUE *argv, VALUE self)
+{
+ VALUE value, digits, result;
+ SIGNED_VALUE n = -1;
+
+ argc = rb_scan_args(argc, argv, "11", &value, &digits);
+ if (argc > 1) {
+ n = GetPrecisionInt(digits);
+ }
+
+ if (n > 0) {
+ result = BigDecimal_div2(self, value, digits);
+ }
+ else {
+ result = BigDecimal_div(self, value);
+ }
+
+ return result;
+}
+
/*
* %: mod = a%b = a - (a.to_f/b).floor * b
* div = (a.to_f/b).floor
@@ -1427,6 +1744,7 @@ BigDecimal_DoDivmod(VALUE self, VALUE r, Real **div, Real **mod)
ENTER(8);
Real *c=NULL, *d=NULL, *res=NULL;
Real *a, *b;
+ ssize_t a_prec, b_prec;
size_t mx;
TypedData_Get_Struct(self, Real, &BigDecimal_data_type, a);
@@ -1484,26 +1802,39 @@ BigDecimal_DoDivmod(VALUE self, VALUE r, Real **div, Real **mod)
return Qtrue;
}
- mx = a->Prec + vabs(a->exponent);
- if (mx<b->Prec + vabs(b->exponent)) mx = b->Prec + vabs(b->exponent);
- mx = (mx + 1) * VpBaseFig();
- GUARD_OBJ(c, VpCreateRbObject(mx, "0", true));
- GUARD_OBJ(res, VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0", true));
+ BigDecimal_count_precision_and_scale(self, &a_prec, NULL);
+ BigDecimal_count_precision_and_scale(rr, &b_prec, NULL);
+
+ mx = (a_prec > b_prec) ? a_prec : b_prec;
+ mx *= 2;
+
+ if (2*BIGDECIMAL_DOUBLE_FIGURES > mx)
+ mx = 2*BIGDECIMAL_DOUBLE_FIGURES;
+
+ GUARD_OBJ(c, VpCreateRbObject(mx + 2*BASE_FIG, "0", true));
+ GUARD_OBJ(res, VpCreateRbObject(mx*2 + 2*BASE_FIG, "#0", true));
VpDivd(c, res, a, b);
- mx = c->Prec * (VpBaseFig() + 1);
+
+ mx = c->Prec * BASE_FIG;
GUARD_OBJ(d, VpCreateRbObject(mx, "0", true));
VpActiveRound(d, c, VP_ROUND_DOWN, 0);
+
VpMult(res, d, b);
VpAddSub(c, a, res, -1);
+
if (!VpIsZero(c) && (VpGetSign(a) * VpGetSign(b) < 0)) {
- VpAddSub(res, d, VpOne(), -1);
- GUARD_OBJ(d, VpCreateRbObject(GetAddSubPrec(c, b)*(VpBaseFig() + 1), "0", true));
- VpAddSub(d, c, b, 1);
- *div = res;
- *mod = d;
- } else {
- *div = d;
- *mod = c;
+ /* result adjustment for negative case */
+ res = VpReallocReal(res, d->MaxPrec);
+ res->MaxPrec = d->MaxPrec;
+ VpAddSub(res, d, VpOne(), -1);
+ GUARD_OBJ(d, VpCreateRbObject(GetAddSubPrec(c, b) * 2*BASE_FIG, "0", true));
+ VpAddSub(d, c, b, 1);
+ *div = res;
+ *mod = d;
+ }
+ else {
+ *div = d;
+ *mod = c;
}
return Qtrue;
@@ -1663,11 +1994,18 @@ BigDecimal_div2(VALUE self, VALUE b, VALUE n)
Real *res = NULL;
Real *av = NULL, *bv = NULL, *cv = NULL;
size_t mx = ix + VpBaseFig()*2;
+ size_t b_prec = ix;
size_t pl = VpSetPrecLimit(0);
GUARD_OBJ(cv, VpCreateRbObject(mx + VpBaseFig(), "0", true));
GUARD_OBJ(av, GetVpValue(self, 1));
- GUARD_OBJ(bv, GetVpValue(b, 1));
+ /* TODO: I want to refactor this precision control for a float value later
+ * by introducing an implicit conversion function instead of
+ * GetVpValueWithPrec. */
+ if (RB_FLOAT_TYPE_P(b) && b_prec > BIGDECIMAL_DOUBLE_FIGURES) {
+ b_prec = BIGDECIMAL_DOUBLE_FIGURES;
+ }
+ GUARD_OBJ(bv, GetVpValueWithPrec(b, b_prec, 1));
mx = av->Prec + bv->Prec + 2;
if (mx <= cv->MaxPrec) mx = cv->MaxPrec + 1;
GUARD_OBJ(res, VpCreateRbObject((mx * 2 + 2)*VpBaseFig(), "#0", true));
@@ -1682,6 +2020,7 @@ BigDecimal_div2(VALUE self, VALUE b, VALUE n)
* Document-method: BigDecimal#div
*
* call-seq:
+ * div(value) -> integer
* div(value, digits) -> bigdecimal or integer
*
* Divide by the specified value.
@@ -1696,6 +2035,9 @@ BigDecimal_div2(VALUE self, VALUE b, VALUE n)
* If digits is not specified, the result is an integer,
* by analogy with Float#div; see also BigDecimal#divmod.
*
+ * See BigDecimal#/.
+ * See BigDecimal#quo.
+ *
* Examples:
*
* a = BigDecimal("4")
@@ -1719,6 +2061,31 @@ BigDecimal_div3(int argc, VALUE *argv, VALUE self)
return BigDecimal_div2(self, b, n);
}
+ /*
+ * call-seq:
+ * add(value, ndigits) -> new_bigdecimal
+ *
+ * Returns the \BigDecimal sum of +self+ and +value+
+ * with a precision of +ndigits+ decimal digits.
+ *
+ * When +ndigits+ is less than the number of significant digits
+ * in the sum, the sum is rounded to that number of digits,
+ * according to the current rounding mode; see BigDecimal.mode.
+ *
+ * Examples:
+ *
+ * # Set the rounding mode.
+ * BigDecimal.mode(BigDecimal::ROUND_MODE, :half_up)
+ * b = BigDecimal('111111.111')
+ * b.add(1, 0) # => 0.111112111e6
+ * b.add(1, 3) # => 0.111e6
+ * b.add(1, 6) # => 0.111112e6
+ * b.add(1, 15) # => 0.111112111e6
+ * b.add(1.0, 15) # => 0.111112111e6
+ * b.add(Rational(1, 1), 15) # => 0.111112111e6
+ *
+ */
+
static VALUE
BigDecimal_add2(VALUE self, VALUE b, VALUE n)
{
@@ -1766,6 +2133,31 @@ BigDecimal_sub2(VALUE self, VALUE b, VALUE n)
}
}
+ /*
+ * call-seq:
+ * mult(other, ndigits) -> bigdecimal
+ *
+ * Returns the \BigDecimal product of +self+ and +value+
+ * with a precision of +ndigits+ decimal digits.
+ *
+ * When +ndigits+ is less than the number of significant digits
+ * in the sum, the sum is rounded to that number of digits,
+ * according to the current rounding mode; see BigDecimal.mode.
+ *
+ * Examples:
+ *
+ * # Set the rounding mode.
+ * BigDecimal.mode(BigDecimal::ROUND_MODE, :half_up)
+ * b = BigDecimal('555555.555')
+ * b.mult(3, 0) # => 0.1666666665e7
+ * b.mult(3, 3) # => 0.167e7
+ * b.mult(3, 6) # => 0.166667e7
+ * b.mult(3, 15) # => 0.1666666665e7
+ * b.mult(3.0, 0) # => 0.1666666665e7
+ * b.mult(Rational(3, 1), 0) # => 0.1666666665e7
+ * b.mult(Complex(3, 0), 0) # => (0.1666666665e7+0.0i)
+ *
+ */
static VALUE
BigDecimal_mult2(VALUE self, VALUE b, VALUE n)
@@ -1786,12 +2178,13 @@ BigDecimal_mult2(VALUE self, VALUE b, VALUE n)
/*
* call-seq:
- * big_decimal.abs -> big_decimal
+ * abs -> bigdecimal
*
- * Returns the absolute value, as a BigDecimal.
+ * Returns the \BigDecimal absolute value of +self+:
+ *
+ * BigDecimal('5').abs # => 0.5e1
+ * BigDecimal('-3').abs # => 0.3e1
*
- * BigDecimal('5').abs #=> 0.5e1
- * BigDecimal('-3').abs #=> 0.3e1
*/
static VALUE
@@ -2637,12 +3030,18 @@ BigDecimal_power(int argc, VALUE*argv, VALUE self)
return VpCheckGetValue(y);
}
-/* call-seq:
- * a ** n -> bigdecimal
+/* call-seq:
+ * self ** other -> bigdecimal
*
- * Returns the value raised to the power of n.
+ * Returns the \BigDecimal value of +self+ raised to power +other+:
+ *
+ * b = BigDecimal('3.14')
+ * b ** 2 # => 0.98596e1
+ * b ** 2.0 # => 0.98596e1
+ * b ** Rational(2, 1) # => 0.98596e1
+ *
+ * Related: BigDecimal#power.
*
- * See BigDecimal#power.
*/
static VALUE
BigDecimal_power_op(VALUE self, VALUE exp)
@@ -2732,21 +3131,29 @@ rb_uint64_convert_to_BigDecimal(uint64_t uval, RB_UNUSED_VAR(size_t digs), int r
}
else {
DECDIG buf[BIGDECIMAL_INT64_MAX_LENGTH] = {0,};
- size_t exp = 0, ntz = 0;
- for (; uval > 0; ++exp) {
- DECDIG r = uval % BASE;
- if (r == 0) ++ntz;
- buf[BIGDECIMAL_INT64_MAX_LENGTH - exp - 1] = r;
+ DECDIG r = uval % BASE;
+ size_t len = 0, ntz = 0;
+ if (r == 0) {
+ // Count and skip trailing zeros
+ for (; r == 0 && uval > 0; ++ntz) {
+ uval /= BASE;
+ r = uval % BASE;
+ }
+ }
+ for (; uval > 0; ++len) {
+ // Store digits
+ buf[BIGDECIMAL_INT64_MAX_LENGTH - len - 1] = r;
uval /= BASE;
+ r = uval % BASE;
}
- const size_t len = exp - ntz;
+ const size_t exp = len + ntz;
vp = VpAllocReal(len);
vp->MaxPrec = len;
vp->Prec = len;
vp->exponent = exp;
VpSetSign(vp, 1);
- MEMCPY(vp->frac, buf + BIGDECIMAL_INT64_MAX_LENGTH - exp, DECDIG, len);
+ MEMCPY(vp->frac, buf + BIGDECIMAL_INT64_MAX_LENGTH - len, DECDIG, len);
}
return BigDecimal_wrap_struct(obj, vp);
@@ -2770,8 +3177,12 @@ rb_big_convert_to_BigDecimal(VALUE val, RB_UNUSED_VAR(size_t digs), int raise_ex
{
assert(RB_TYPE_P(val, T_BIGNUM));
- size_t size = rb_absint_size(val, NULL);
+ int leading_zeros;
+ size_t size = rb_absint_size(val, &leading_zeros);
int sign = FIX2INT(rb_big_cmp(val, INT2FIX(0)));
+ if (sign < 0 && leading_zeros == 0) {
+ size += 1;
+ }
if (size <= sizeof(long)) {
if (sign < 0) {
return rb_int64_convert_to_BigDecimal(NUM2LONG(val), digs, raise_exception);
@@ -3078,50 +3489,49 @@ rb_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception)
return rb_str_convert_to_BigDecimal(str, digs, raise_exception);
}
-/* call-seq:
- * BigDecimal(arg, exception: true)
- * BigDecimal(arg, digits, exception: true)
- *
- * Returns <i>arg</i> converted to a BigDecimal. Numeric types are converted
- * directly. Other types except for String are first converted to String
- * by <code>to_str</code>. Strings can be converted when it has appropriate
- * forms of decimal numbers. Exceptions can be suppressed by passing
- * <code>exception: false</code>.
+/* call-seq:
+ * BigDecimal(value, exception: true) -> bigdecimal
+ * BigDecimal(value, ndigits, exception: true) -> bigdecimal
*
- * When <i>arg</i> is a Float and <i>digits</i> is <code>0</code>, the number
- * of digits is determined by the algorithm of <code>dtoa</code> function
- * written by David M. Gay. That algorithm is based on "How to Print Floating-
- * Point Numbers Accurately" by Guy L. Steele, Jr. and Jon L. White [Proc. ACM
- * SIGPLAN '90, pp. 112-126].
+ * Returns the \BigDecimal converted from +value+
+ * with a precision of +ndigits+ decimal digits.
*
- * arg:: The value converted to a BigDecimal.
+ * When +ndigits+ is less than the number of significant digits
+ * in the value, the result is rounded to that number of digits,
+ * according to the current rounding mode; see BigDecimal.mode.
*
- * If it is a String, spaces are ignored and unrecognized characters
- * terminate the value.
+ * Returns +value+ converted to a \BigDecimal, depending on the type of +value+:
*
- * digits:: The number of significant digits, as an Integer. If omitted,
- * the number of significant digits is determined from <i>arg</i>.
+ * - Integer, Float, Rational, Complex, or BigDecimal: converted directly:
*
- * The actual number of significant digits used in computation is
- * usually larger than the specified number.
+ * # Integer, Complex, or BigDecimal value does not require ndigits; ignored if given.
+ * BigDecimal(2) # => 0.2e1
+ * BigDecimal(Complex(2, 0)) # => 0.2e1
+ * BigDecimal(BigDecimal(2)) # => 0.2e1
+ * # Float or Rational value requires ndigits.
+ * BigDecimal(2.0, 0) # => 0.2e1
+ * BigDecimal(Rational(2, 1), 0) # => 0.2e1
*
- * exception:: Whether an exception should be raised on invalid arguments.
- * +true+ by default, if passed +false+, just returns +nil+
- * for invalid.
+ * - String: converted by parsing if it contains an integer or floating-point literal;
+ * leading and trailing whitespace is ignored:
*
+ * # String does not require ndigits; ignored if given.
+ * BigDecimal('2') # => 0.2e1
+ * BigDecimal('2.0') # => 0.2e1
+ * BigDecimal('0.2e1') # => 0.2e1
+ * BigDecimal(' 2.0 ') # => 0.2e1
*
- * ==== Exceptions
+ * - Other type that responds to method <tt>:to_str</tt>:
+ * first converted to a string, then converted to a \BigDecimal, as above.
*
- * TypeError:: If the +initial+ type is neither Integer, Float,
- * Rational, nor BigDecimal, this exception is raised.
+ * - Other type:
*
- * TypeError:: If the +digits+ is not an Integer, this exception is raised.
+ * - Raises an exception if keyword argument +exception+ is +true+.
+ * - Returns +nil+ if keyword argument +exception+ is +true+.
*
- * ArgumentError:: If +initial+ is a Float, and the +digits+ is larger than
- * Float::DIG + 1, this exception is raised.
+ * Raises an exception if +value+ evaluates to a Float
+ * and +digits+ is larger than Float::DIG + 1.
*
- * ArgumentError:: If the +initial+ is a Float or Rational, and the +digits+
- * value is omitted, this exception is raised.
*/
static VALUE
f_BigDecimal(int argc, VALUE *argv, VALUE self)
@@ -3671,6 +4081,18 @@ BigDecimal_negative_zero(void)
*
* (1.2 - 1.0) == 0.2 #=> false
*
+ * == A Note About Precision
+ *
+ * For a calculation using a \BigDecimal and another +value+,
+ * the precision of the result depends on the type of +value+:
+ *
+ * - If +value+ is a \Float,
+ * the precision is Float::DIG + 1.
+ * - If +value+ is a \Rational, the precision is larger than Float::DIG + 1.
+ * - If +value+ is a \BigDecimal, the precision is +value+'s precision in the
+ * internal representation, which is platform-dependent.
+ * - If +value+ is other object, the precision is determined by the result of +BigDecimal(value)+.
+ *
* == Special features of accurate decimal arithmetic
*
* Because BigDecimal is more accurate than normal binary floating point
@@ -3931,6 +4353,8 @@ Init_bigdecimal(void)
/* instance methods */
rb_define_method(rb_cBigDecimal, "precs", BigDecimal_prec, 0);
rb_define_method(rb_cBigDecimal, "precision", BigDecimal_precision, 0);
+ rb_define_method(rb_cBigDecimal, "scale", BigDecimal_scale, 0);
+ rb_define_method(rb_cBigDecimal, "precision_scale", BigDecimal_precision_scale, 0);
rb_define_method(rb_cBigDecimal, "n_significant_digits", BigDecimal_n_significant_digits, 0);
rb_define_method(rb_cBigDecimal, "add", BigDecimal_add2, 2);
@@ -3949,7 +4373,7 @@ Init_bigdecimal(void)
rb_define_method(rb_cBigDecimal, "-@", BigDecimal_neg, 0);
rb_define_method(rb_cBigDecimal, "*", BigDecimal_mult, 1);
rb_define_method(rb_cBigDecimal, "/", BigDecimal_div, 1);
- rb_define_method(rb_cBigDecimal, "quo", BigDecimal_div, 1);
+ rb_define_method(rb_cBigDecimal, "quo", BigDecimal_quo, -1);
rb_define_method(rb_cBigDecimal, "%", BigDecimal_mod, 1);
rb_define_method(rb_cBigDecimal, "modulo", BigDecimal_mod, 1);
rb_define_method(rb_cBigDecimal, "remainder", BigDecimal_remainder, 1);
@@ -4123,6 +4547,27 @@ VpSetException(unsigned short f)
bigdecimal_set_thread_local_exception_mode(f);
}
+static void
+VpCheckException(Real *p, bool always)
+{
+ if (VpIsNaN(p)) {
+ VpException(VP_EXCEPTION_NaN, "Computation results in 'NaN' (Not a Number)", always);
+ }
+ else if (VpIsPosInf(p)) {
+ VpException(VP_EXCEPTION_INFINITY, "Computation results in 'Infinity'", always);
+ }
+ else if (VpIsNegInf(p)) {
+ VpException(VP_EXCEPTION_INFINITY, "Computation results in '-Infinity'", always);
+ }
+}
+
+static VALUE
+VpCheckGetValue(Real *p)
+{
+ VpCheckException(p, false);
+ return p->obj;
+}
+
/*
* Precision limit.
*/
@@ -5486,18 +5931,17 @@ VpDivd(Real *c, Real *r, Real *a, Real *b)
word_c = c->MaxPrec;
word_r = r->MaxPrec;
- ind_c = 0;
- ind_r = 1;
-
if (word_a >= word_r) goto space_error;
+ ind_r = 1;
r->frac[0] = 0;
while (ind_r <= word_a) {
r->frac[ind_r] = a->frac[ind_r - 1];
++ind_r;
}
-
while (ind_r < word_r) r->frac[ind_r++] = 0;
+
+ ind_c = 0;
while (ind_c < word_c) c->frac[ind_c++] = 0;
/* initial procedure */
diff --git a/ext/bigdecimal/bigdecimal.gemspec b/ext/bigdecimal/bigdecimal.gemspec
index bb4610cbbd8..2ed7d09373b 100644
--- a/ext/bigdecimal/bigdecimal.gemspec
+++ b/ext/bigdecimal/bigdecimal.gemspec
@@ -1,10 +1,8 @@
# coding: utf-8
-bigdecimal_version = '3.1.0.dev'
-
Gem::Specification.new do |s|
s.name = "bigdecimal"
- s.version = bigdecimal_version
+ s.version = "3.1.2"
s.authors = ["Kenta Murata", "Zachary Scott", "Shigeo Kobayashi"]
s.email = ["mrkn@mrkn.jp"]
diff --git a/ext/bigdecimal/depend b/ext/bigdecimal/depend
index d54de7c3c71..d6f40714b31 100644
--- a/ext/bigdecimal/depend
+++ b/ext/bigdecimal/depend
@@ -8,7 +8,6 @@ bigdecimal.o: $(hdrdir)/ruby/assert.h
bigdecimal.o: $(hdrdir)/ruby/backward/2/assume.h
bigdecimal.o: $(hdrdir)/ruby/backward/2/attributes.h
bigdecimal.o: $(hdrdir)/ruby/backward/2/bool.h
-bigdecimal.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
bigdecimal.o: $(hdrdir)/ruby/backward/2/inttypes.h
bigdecimal.o: $(hdrdir)/ruby/backward/2/limits.h
bigdecimal.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -174,7 +173,6 @@ missing.o: $(hdrdir)/ruby/backward.h
missing.o: $(hdrdir)/ruby/backward/2/assume.h
missing.o: $(hdrdir)/ruby/backward/2/attributes.h
missing.o: $(hdrdir)/ruby/backward/2/bool.h
-missing.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
missing.o: $(hdrdir)/ruby/backward/2/inttypes.h
missing.o: $(hdrdir)/ruby/backward/2/limits.h
missing.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/bigdecimal/extconf.rb b/ext/bigdecimal/extconf.rb
index c92aacb3f2f..9b0c55b21c1 100644
--- a/ext/bigdecimal/extconf.rb
+++ b/ext/bigdecimal/extconf.rb
@@ -3,10 +3,7 @@ require 'mkmf'
def check_bigdecimal_version(gemspec_path)
message "checking RUBY_BIGDECIMAL_VERSION... "
-
- bigdecimal_version =
- IO.readlines(gemspec_path)
- .grep(/\Abigdecimal_version\s+=\s+/)[0][/\'([^\']+)\'/, 1]
+ bigdecimal_version = File.read(gemspec_path).match(/^\s*s\.version\s+=\s+['"]([^'"]+)['"]\s*$/)[1]
version_components = bigdecimal_version.split('.')
bigdecimal_version = version_components[0, 3].join('.')
diff --git a/ext/cgi/escape/depend b/ext/cgi/escape/depend
index a965ccfca7a..e726e579d88 100644
--- a/ext/cgi/escape/depend
+++ b/ext/cgi/escape/depend
@@ -7,7 +7,6 @@ escape.o: $(hdrdir)/ruby/backward.h
escape.o: $(hdrdir)/ruby/backward/2/assume.h
escape.o: $(hdrdir)/ruby/backward/2/attributes.h
escape.o: $(hdrdir)/ruby/backward/2/bool.h
-escape.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
escape.o: $(hdrdir)/ruby/backward/2/inttypes.h
escape.o: $(hdrdir)/ruby/backward/2/limits.h
escape.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/cgi/escape/escape.c b/ext/cgi/escape/escape.c
index 3a7837e4df9..f88b61478b7 100644
--- a/ext/cgi/escape/escape.c
+++ b/ext/cgi/escape/escape.c
@@ -32,11 +32,21 @@ preserve_original_state(VALUE orig, VALUE dest)
rb_enc_associate(dest, rb_enc_get(orig));
}
+static inline long
+escaped_length(VALUE str)
+{
+ const long len = RSTRING_LEN(str);
+ if (len >= LONG_MAX / HTML_ESCAPE_MAX_LEN) {
+ ruby_malloc_size_overflow(len, HTML_ESCAPE_MAX_LEN);
+ }
+ return len * HTML_ESCAPE_MAX_LEN;
+}
+
static VALUE
optimized_escape_html(VALUE str)
{
VALUE vbuf;
- char *buf = ALLOCV_N(char, vbuf, RSTRING_LEN(str) * HTML_ESCAPE_MAX_LEN);
+ char *buf = ALLOCV_N(char, vbuf, escaped_length(str));
const char *cstr = RSTRING_PTR(str);
const char *end = cstr + RSTRING_LEN(str);
diff --git a/ext/continuation/depend b/ext/continuation/depend
index c8e55b0b1c6..14ecac14436 100644
--- a/ext/continuation/depend
+++ b/ext/continuation/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
continuation.o: $(RUBY_EXTCONF_H)
continuation.o: $(arch_hdrdir)/ruby/config.h
+continuation.o: $(hdrdir)/ruby/assert.h
+continuation.o: $(hdrdir)/ruby/backward.h
+continuation.o: $(hdrdir)/ruby/backward/2/assume.h
+continuation.o: $(hdrdir)/ruby/backward/2/attributes.h
+continuation.o: $(hdrdir)/ruby/backward/2/bool.h
+continuation.o: $(hdrdir)/ruby/backward/2/inttypes.h
+continuation.o: $(hdrdir)/ruby/backward/2/limits.h
+continuation.o: $(hdrdir)/ruby/backward/2/long_long.h
+continuation.o: $(hdrdir)/ruby/backward/2/stdalign.h
+continuation.o: $(hdrdir)/ruby/backward/2/stdarg.h
+continuation.o: $(hdrdir)/ruby/defines.h
+continuation.o: $(hdrdir)/ruby/intern.h
continuation.o: $(hdrdir)/ruby/internal/anyargs.h
continuation.o: $(hdrdir)/ruby/internal/arithmetic.h
continuation.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ continuation.o: $(hdrdir)/ruby/internal/value_type.h
continuation.o: $(hdrdir)/ruby/internal/variable.h
continuation.o: $(hdrdir)/ruby/internal/warning_push.h
continuation.o: $(hdrdir)/ruby/internal/xmalloc.h
-continuation.o: $(hdrdir)/ruby/assert.h
-continuation.o: $(hdrdir)/ruby/backward.h
-continuation.o: $(hdrdir)/ruby/backward/2/assume.h
-continuation.o: $(hdrdir)/ruby/backward/2/attributes.h
-continuation.o: $(hdrdir)/ruby/backward/2/bool.h
-continuation.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-continuation.o: $(hdrdir)/ruby/backward/2/inttypes.h
-continuation.o: $(hdrdir)/ruby/backward/2/limits.h
-continuation.o: $(hdrdir)/ruby/backward/2/long_long.h
-continuation.o: $(hdrdir)/ruby/backward/2/stdalign.h
-continuation.o: $(hdrdir)/ruby/backward/2/stdarg.h
-continuation.o: $(hdrdir)/ruby/defines.h
-continuation.o: $(hdrdir)/ruby/intern.h
continuation.o: $(hdrdir)/ruby/missing.h
continuation.o: $(hdrdir)/ruby/ruby.h
continuation.o: $(hdrdir)/ruby/st.h
diff --git a/ext/coverage/coverage.c b/ext/coverage/coverage.c
index f948f623078..3dc2490d40c 100644
--- a/ext/coverage/coverage.c
+++ b/ext/coverage/coverage.c
@@ -348,7 +348,7 @@ clear_me2counter_i(VALUE key, VALUE value, VALUE unused)
* Coverage.suspend => nil
*
* Suspend the coverage measurement.
- * You can use Coverage.resumt to restart the measurement.
+ * You can use Coverage.resume to restart the measurement.
*/
VALUE
rb_coverage_suspend(VALUE klass)
diff --git a/ext/date/date.gemspec b/ext/date/date.gemspec
index 88e5838d2e1..cf076969766 100644
--- a/ext/date/date.gemspec
+++ b/ext/date/date.gemspec
@@ -1,7 +1,12 @@
# frozen_string_literal: true
+
+version = File.foreach(File.expand_path("../lib/date.rb", __FILE__)).find do |line|
+ /^\s*VERSION\s*=\s*["'](.*)["']/ =~ line and break $1
+end
+
Gem::Specification.new do |s|
s.name = "date"
- s.version = '3.2.0'
+ s.version = version
s.summary = "A subclass of Object includes Comparable module for handling dates."
s.description = "A subclass of Object includes Comparable module for handling dates."
diff --git a/ext/date/date_core.c b/ext/date/date_core.c
index 146f60fef6a..f6579b81e44 100644
--- a/ext/date/date_core.c
+++ b/ext/date/date_core.c
@@ -4328,12 +4328,40 @@ date_s_strptime(int argc, VALUE *argv, VALUE klass)
VALUE date__parse(VALUE str, VALUE comp);
+static size_t
+get_limit(VALUE opt)
+{
+ if (!NIL_P(opt)) {
+ VALUE limit = rb_hash_aref(opt, ID2SYM(rb_intern("limit")));
+ if (NIL_P(limit)) return SIZE_MAX;
+ return NUM2SIZET(limit);
+ }
+ return 128;
+}
+
+static void
+check_limit(VALUE str, VALUE opt)
+{
+ if (NIL_P(str)) return;
+ if (SYMBOL_P(str)) str = rb_sym2str(str);
+
+ StringValue(str);
+ size_t slen = RSTRING_LEN(str);
+ size_t limit = get_limit(opt);
+ if (slen > limit) {
+ rb_raise(rb_eArgError,
+ "string length (%"PRI_SIZE_PREFIX"u) exceeds the limit %"PRI_SIZE_PREFIX"u", slen, limit);
+ }
+}
+
static VALUE
date_s__parse_internal(int argc, VALUE *argv, VALUE klass)
{
- VALUE vstr, vcomp, hash;
+ VALUE vstr, vcomp, hash, opt;
- rb_scan_args(argc, argv, "11", &vstr, &vcomp);
+ rb_scan_args(argc, argv, "11:", &vstr, &vcomp, &opt);
+ if (!NIL_P(opt)) argc--;
+ check_limit(vstr, opt);
StringValue(vstr);
if (!rb_enc_str_asciicompat_p(vstr))
rb_raise(rb_eArgError,
@@ -4348,7 +4376,7 @@ date_s__parse_internal(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * Date._parse(string[, comp=true]) -> hash
+ * Date._parse(string[, comp=true], limit: 128) -> hash
*
* Parses the given representation of date and time, and returns a
* hash of parsed elements.
@@ -4363,6 +4391,10 @@ date_s__parse_internal(int argc, VALUE *argv, VALUE klass)
* it full.
*
* Date._parse('2001-02-03') #=> {:year=>2001, :mon=>2, :mday=>3}
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
date_s__parse(int argc, VALUE *argv, VALUE klass)
@@ -4372,7 +4404,7 @@ date_s__parse(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * Date.parse(string='-4712-01-01'[, comp=true[, start=Date::ITALY]]) -> date
+ * Date.parse(string='-4712-01-01'[, comp=true[, start=Date::ITALY]], limit: 128) -> date
*
* Parses the given representation of date and time, and creates a
* date object.
@@ -4389,13 +4421,18 @@ date_s__parse(int argc, VALUE *argv, VALUE klass)
* Date.parse('2001-02-03') #=> #<Date: 2001-02-03 ...>
* Date.parse('20010203') #=> #<Date: 2001-02-03 ...>
* Date.parse('3rd Feb 2001') #=> #<Date: 2001-02-03 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
date_s_parse(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, comp, sg;
+ VALUE str, comp, sg, opt;
- rb_scan_args(argc, argv, "03", &str, &comp, &sg);
+ rb_scan_args(argc, argv, "03:", &str, &comp, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -4407,11 +4444,12 @@ date_s_parse(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE argv2[2], hash;
-
- argv2[0] = str;
- argv2[1] = comp;
- hash = date_s__parse(2, argv2, klass);
+ int argc2 = 2;
+ VALUE argv2[3];
+ argv2[0] = str;
+ argv2[1] = comp;
+ if (!NIL_P(opt)) argv2[argc2++] = opt;
+ VALUE hash = date_s__parse(argc2, argv2, klass);
return d_new_by_frags(klass, hash, sg);
}
}
@@ -4425,19 +4463,28 @@ VALUE date__jisx0301(VALUE);
/*
* call-seq:
- * Date._iso8601(string) -> hash
+ * Date._iso8601(string, limit: 128) -> hash
*
* Returns a hash of parsed elements.
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
-date_s__iso8601(VALUE klass, VALUE str)
+date_s__iso8601(int argc, VALUE *argv, VALUE klass)
{
+ VALUE str, opt;
+
+ rb_scan_args(argc, argv, "1:", &str, &opt);
+ check_limit(str, opt);
+
return date__iso8601(str);
}
/*
* call-seq:
- * Date.iso8601(string='-4712-01-01'[, start=Date::ITALY]) -> date
+ * Date.iso8601(string='-4712-01-01'[, start=Date::ITALY], limit: 128) -> date
*
* Creates a new Date object by parsing from a string according to
* some typical ISO 8601 formats.
@@ -4445,13 +4492,18 @@ date_s__iso8601(VALUE klass, VALUE str)
* Date.iso8601('2001-02-03') #=> #<Date: 2001-02-03 ...>
* Date.iso8601('20010203') #=> #<Date: 2001-02-03 ...>
* Date.iso8601('2001-W05-6') #=> #<Date: 2001-02-03 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
date_s_iso8601(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -4461,38 +4513,56 @@ date_s_iso8601(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__iso8601(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2];
+ argv2[0] = str;
+ if (!NIL_P(opt)) argv2[argc2++] = opt;
+ VALUE hash = date_s__iso8601(argc2, argv2, klass);
return d_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * Date._rfc3339(string) -> hash
+ * Date._rfc3339(string, limit: 128) -> hash
*
* Returns a hash of parsed elements.
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
-date_s__rfc3339(VALUE klass, VALUE str)
+date_s__rfc3339(int argc, VALUE *argv, VALUE klass)
{
+ VALUE str, opt;
+
+ rb_scan_args(argc, argv, "1:", &str, &opt);
+ check_limit(str, opt);
+
return date__rfc3339(str);
}
/*
* call-seq:
- * Date.rfc3339(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY]) -> date
+ * Date.rfc3339(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY], limit: 128) -> date
*
* Creates a new Date object by parsing from a string according to
* some typical RFC 3339 formats.
*
* Date.rfc3339('2001-02-03T04:05:06+07:00') #=> #<Date: 2001-02-03 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
date_s_rfc3339(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -4502,38 +4572,56 @@ date_s_rfc3339(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__rfc3339(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2];
+ argv2[0] = str;
+ if (!NIL_P(opt)) argv2[argc2++] = opt;
+ VALUE hash = date_s__rfc3339(argc2, argv2, klass);
return d_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * Date._xmlschema(string) -> hash
+ * Date._xmlschema(string, limit: 128) -> hash
*
* Returns a hash of parsed elements.
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
-date_s__xmlschema(VALUE klass, VALUE str)
+date_s__xmlschema(int argc, VALUE *argv, VALUE klass)
{
+ VALUE str, opt;
+
+ rb_scan_args(argc, argv, "1:", &str, &opt);
+ check_limit(str, opt);
+
return date__xmlschema(str);
}
/*
* call-seq:
- * Date.xmlschema(string='-4712-01-01'[, start=Date::ITALY]) -> date
+ * Date.xmlschema(string='-4712-01-01'[, start=Date::ITALY], limit: 128) -> date
*
* Creates a new Date object by parsing from a string according to
* some typical XML Schema formats.
*
* Date.xmlschema('2001-02-03') #=> #<Date: 2001-02-03 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
date_s_xmlschema(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -4543,41 +4631,58 @@ date_s_xmlschema(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__xmlschema(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2];
+ argv2[0] = str;
+ if (!NIL_P(opt)) argv2[argc2++] = opt;
+ VALUE hash = date_s__xmlschema(argc2, argv2, klass);
return d_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * Date._rfc2822(string) -> hash
- * Date._rfc822(string) -> hash
+ * Date._rfc2822(string, limit: 128) -> hash
+ * Date._rfc822(string, limit: 128) -> hash
*
* Returns a hash of parsed elements.
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
-date_s__rfc2822(VALUE klass, VALUE str)
+date_s__rfc2822(int argc, VALUE *argv, VALUE klass)
{
+ VALUE str, opt;
+
+ rb_scan_args(argc, argv, "1:", &str, &opt);
+ check_limit(str, opt);
+
return date__rfc2822(str);
}
/*
* call-seq:
- * Date.rfc2822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY]) -> date
- * Date.rfc822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY]) -> date
+ * Date.rfc2822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY], limit: 128) -> date
+ * Date.rfc822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY], limit: 128) -> date
*
* Creates a new Date object by parsing from a string according to
* some typical RFC 2822 formats.
*
* Date.rfc2822('Sat, 3 Feb 2001 00:00:00 +0000')
* #=> #<Date: 2001-02-03 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
date_s_rfc2822(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
switch (argc) {
case 0:
@@ -4587,39 +4692,56 @@ date_s_rfc2822(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__rfc2822(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2];
+ argv2[0] = str;
+ if (!NIL_P(opt)) argv2[argc2++] = opt;
+ VALUE hash = date_s__rfc2822(argc2, argv2, klass);
return d_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * Date._httpdate(string) -> hash
+ * Date._httpdate(string, limit: 128) -> hash
*
* Returns a hash of parsed elements.
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
-date_s__httpdate(VALUE klass, VALUE str)
+date_s__httpdate(int argc, VALUE *argv, VALUE klass)
{
+ VALUE str, opt;
+
+ rb_scan_args(argc, argv, "1:", &str, &opt);
+ check_limit(str, opt);
+
return date__httpdate(str);
}
/*
* call-seq:
- * Date.httpdate(string='Mon, 01 Jan -4712 00:00:00 GMT'[, start=Date::ITALY]) -> date
+ * Date.httpdate(string='Mon, 01 Jan -4712 00:00:00 GMT'[, start=Date::ITALY], limit: 128) -> date
*
* Creates a new Date object by parsing from a string according to
* some RFC 2616 format.
*
* Date.httpdate('Sat, 03 Feb 2001 00:00:00 GMT')
* #=> #<Date: 2001-02-03 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
date_s_httpdate(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
switch (argc) {
case 0:
@@ -4629,26 +4751,39 @@ date_s_httpdate(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__httpdate(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2];
+ argv2[0] = str;
+ if (!NIL_P(opt)) argv2[argc2++] = opt;
+ VALUE hash = date_s__httpdate(argc2, argv2, klass);
return d_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * Date._jisx0301(string) -> hash
+ * Date._jisx0301(string, limit: 128) -> hash
*
* Returns a hash of parsed elements.
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
-date_s__jisx0301(VALUE klass, VALUE str)
+date_s__jisx0301(int argc, VALUE *argv, VALUE klass)
{
+ VALUE str, opt;
+
+ rb_scan_args(argc, argv, "1:", &str, &opt);
+ check_limit(str, opt);
+
return date__jisx0301(str);
}
/*
* call-seq:
- * Date.jisx0301(string='-4712-01-01'[, start=Date::ITALY]) -> date
+ * Date.jisx0301(string='-4712-01-01'[, start=Date::ITALY], limit: 128) -> date
*
* Creates a new Date object by parsing from a string according to
* some typical JIS X 0301 formats.
@@ -4658,13 +4793,18 @@ date_s__jisx0301(VALUE klass, VALUE str)
* For no-era year, legacy format, Heisei is assumed.
*
* Date.jisx0301('13.02.03') #=> #<Date: 2001-02-03 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
date_s_jisx0301(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -4674,7 +4814,11 @@ date_s_jisx0301(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__jisx0301(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2];
+ argv2[0] = str;
+ if (!NIL_P(opt)) argv2[argc2++] = opt;
+ VALUE hash = date_s__jisx0301(argc2, argv2, klass);
return d_new_by_frags(klass, hash, sg);
}
}
@@ -8013,7 +8157,7 @@ datetime_s_strptime(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * DateTime.parse(string='-4712-01-01T00:00:00+00:00'[, comp=true[, start=Date::ITALY]]) -> datetime
+ * DateTime.parse(string='-4712-01-01T00:00:00+00:00'[, comp=true[, start=Date::ITALY]], limit: 128) -> datetime
*
* Parses the given representation of date and time, and creates a
* DateTime object.
@@ -8032,13 +8176,18 @@ datetime_s_strptime(int argc, VALUE *argv, VALUE klass)
* #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
* DateTime.parse('3rd Feb 2001 04:05:06 PM')
* #=> #<DateTime: 2001-02-03T16:05:06+00:00 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
datetime_s_parse(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, comp, sg;
+ VALUE str, comp, sg, opt;
- rb_scan_args(argc, argv, "03", &str, &comp, &sg);
+ rb_scan_args(argc, argv, "03:", &str, &comp, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -8050,18 +8199,20 @@ datetime_s_parse(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE argv2[2], hash;
-
- argv2[0] = str;
- argv2[1] = comp;
- hash = date_s__parse(2, argv2, klass);
+ int argc2 = 2;
+ VALUE argv2[3];
+ argv2[0] = str;
+ argv2[1] = comp;
+ argv2[2] = opt;
+ if (!NIL_P(opt)) argc2++;
+ VALUE hash = date_s__parse(argc2, argv2, klass);
return dt_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * DateTime.iso8601(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY]) -> datetime
+ * DateTime.iso8601(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY], limit: 128) -> datetime
*
* Creates a new DateTime object by parsing from a string according to
* some typical ISO 8601 formats.
@@ -8072,13 +8223,18 @@ datetime_s_parse(int argc, VALUE *argv, VALUE klass)
* #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
* DateTime.iso8601('2001-W05-6T04:05:06+07:00')
* #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
datetime_s_iso8601(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -8088,27 +8244,37 @@ datetime_s_iso8601(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__iso8601(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2];
+ argv2[0] = str;
+ argv2[1] = opt;
+ if (!NIL_P(opt)) argc2--;
+ VALUE hash = date_s__iso8601(argc2, argv2, klass);
return dt_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * DateTime.rfc3339(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY]) -> datetime
+ * DateTime.rfc3339(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY], limit: 128) -> datetime
*
* Creates a new DateTime object by parsing from a string according to
* some typical RFC 3339 formats.
*
* DateTime.rfc3339('2001-02-03T04:05:06+07:00')
* #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
datetime_s_rfc3339(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -8118,27 +8284,37 @@ datetime_s_rfc3339(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__rfc3339(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2];
+ argv2[0] = str;
+ argv2[1] = opt;
+ if (!NIL_P(opt)) argc2++;
+ VALUE hash = date_s__rfc3339(argc2, argv2, klass);
return dt_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * DateTime.xmlschema(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY]) -> datetime
+ * DateTime.xmlschema(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY], limit: 128) -> datetime
*
* Creates a new DateTime object by parsing from a string according to
* some typical XML Schema formats.
*
* DateTime.xmlschema('2001-02-03T04:05:06+07:00')
* #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
datetime_s_xmlschema(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -8148,28 +8324,38 @@ datetime_s_xmlschema(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__xmlschema(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2];
+ argv2[0] = str;
+ argv2[1] = opt;
+ if (!NIL_P(opt)) argc2++;
+ VALUE hash = date_s__xmlschema(argc2, argv2, klass);
return dt_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * DateTime.rfc2822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY]) -> datetime
- * DateTime.rfc822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY]) -> datetime
+ * DateTime.rfc2822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY], limit: 128) -> datetime
+ * DateTime.rfc822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY], limit: 128) -> datetime
*
* Creates a new DateTime object by parsing from a string according to
* some typical RFC 2822 formats.
*
* DateTime.rfc2822('Sat, 3 Feb 2001 04:05:06 +0700')
* #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
datetime_s_rfc2822(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -8179,7 +8365,12 @@ datetime_s_rfc2822(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__rfc2822(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2];
+ argv2[0] = str;
+ argv2[1] = opt;
+ if (!NIL_P(opt)) argc2++;
+ VALUE hash = date_s__rfc2822(argc2, argv2, klass);
return dt_new_by_frags(klass, hash, sg);
}
}
@@ -8193,13 +8384,18 @@ datetime_s_rfc2822(int argc, VALUE *argv, VALUE klass)
*
* DateTime.httpdate('Sat, 03 Feb 2001 04:05:06 GMT')
* #=> #<DateTime: 2001-02-03T04:05:06+00:00 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
datetime_s_httpdate(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -8209,14 +8405,19 @@ datetime_s_httpdate(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__httpdate(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2];
+ argv2[0] = str;
+ argv2[1] = opt;
+ if (!NIL_P(opt)) argc2++;
+ VALUE hash = date_s__httpdate(argc2, argv2, klass);
return dt_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * DateTime.jisx0301(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY]) -> datetime
+ * DateTime.jisx0301(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY], limit: 128) -> datetime
*
* Creates a new DateTime object by parsing from a string according to
* some typical JIS X 0301 formats.
@@ -8228,13 +8429,18 @@ datetime_s_httpdate(int argc, VALUE *argv, VALUE klass)
*
* DateTime.jisx0301('13.02.03T04:05:06+07:00')
* #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing `limit: nil`, but note that
+ * it may take a long time to parse.
*/
static VALUE
datetime_s_jisx0301(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -8244,7 +8450,12 @@ datetime_s_jisx0301(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__jisx0301(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2];
+ argv2[0] = str;
+ argv2[1] = opt;
+ if (!NIL_P(opt)) argc2++;
+ VALUE hash = date_s__jisx0301(argc2, argv2, klass);
return dt_new_by_frags(klass, hash, sg);
}
}
@@ -9403,19 +9614,19 @@ Init_date_core(void)
rb_define_singleton_method(cDate, "strptime", date_s_strptime, -1);
rb_define_singleton_method(cDate, "_parse", date_s__parse, -1);
rb_define_singleton_method(cDate, "parse", date_s_parse, -1);
- rb_define_singleton_method(cDate, "_iso8601", date_s__iso8601, 1);
+ rb_define_singleton_method(cDate, "_iso8601", date_s__iso8601, -1);
rb_define_singleton_method(cDate, "iso8601", date_s_iso8601, -1);
- rb_define_singleton_method(cDate, "_rfc3339", date_s__rfc3339, 1);
+ rb_define_singleton_method(cDate, "_rfc3339", date_s__rfc3339, -1);
rb_define_singleton_method(cDate, "rfc3339", date_s_rfc3339, -1);
- rb_define_singleton_method(cDate, "_xmlschema", date_s__xmlschema, 1);
+ rb_define_singleton_method(cDate, "_xmlschema", date_s__xmlschema, -1);
rb_define_singleton_method(cDate, "xmlschema", date_s_xmlschema, -1);
- rb_define_singleton_method(cDate, "_rfc2822", date_s__rfc2822, 1);
- rb_define_singleton_method(cDate, "_rfc822", date_s__rfc2822, 1);
+ rb_define_singleton_method(cDate, "_rfc2822", date_s__rfc2822, -1);
+ rb_define_singleton_method(cDate, "_rfc822", date_s__rfc2822, -1);
rb_define_singleton_method(cDate, "rfc2822", date_s_rfc2822, -1);
rb_define_singleton_method(cDate, "rfc822", date_s_rfc2822, -1);
- rb_define_singleton_method(cDate, "_httpdate", date_s__httpdate, 1);
+ rb_define_singleton_method(cDate, "_httpdate", date_s__httpdate, -1);
rb_define_singleton_method(cDate, "httpdate", date_s_httpdate, -1);
- rb_define_singleton_method(cDate, "_jisx0301", date_s__jisx0301, 1);
+ rb_define_singleton_method(cDate, "_jisx0301", date_s__jisx0301, -1);
rb_define_singleton_method(cDate, "jisx0301", date_s_jisx0301, -1);
rb_define_method(cDate, "initialize", date_initialize, -1);
diff --git a/ext/date/depend b/ext/date/depend
index 9c893745b95..6841df724d4 100644
--- a/ext/date/depend
+++ b/ext/date/depend
@@ -7,7 +7,6 @@ date_core.o: $(hdrdir)/ruby/backward.h
date_core.o: $(hdrdir)/ruby/backward/2/assume.h
date_core.o: $(hdrdir)/ruby/backward/2/attributes.h
date_core.o: $(hdrdir)/ruby/backward/2/bool.h
-date_core.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
date_core.o: $(hdrdir)/ruby/backward/2/inttypes.h
date_core.o: $(hdrdir)/ruby/backward/2/limits.h
date_core.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -181,7 +180,6 @@ date_parse.o: $(hdrdir)/ruby/backward.h
date_parse.o: $(hdrdir)/ruby/backward/2/assume.h
date_parse.o: $(hdrdir)/ruby/backward/2/attributes.h
date_parse.o: $(hdrdir)/ruby/backward/2/bool.h
-date_parse.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
date_parse.o: $(hdrdir)/ruby/backward/2/inttypes.h
date_parse.o: $(hdrdir)/ruby/backward/2/limits.h
date_parse.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -357,7 +355,6 @@ date_strftime.o: $(hdrdir)/ruby/backward.h
date_strftime.o: $(hdrdir)/ruby/backward/2/assume.h
date_strftime.o: $(hdrdir)/ruby/backward/2/attributes.h
date_strftime.o: $(hdrdir)/ruby/backward/2/bool.h
-date_strftime.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
date_strftime.o: $(hdrdir)/ruby/backward/2/inttypes.h
date_strftime.o: $(hdrdir)/ruby/backward/2/limits.h
date_strftime.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -518,7 +515,6 @@ date_strptime.o: $(hdrdir)/ruby/backward.h
date_strptime.o: $(hdrdir)/ruby/backward/2/assume.h
date_strptime.o: $(hdrdir)/ruby/backward/2/attributes.h
date_strptime.o: $(hdrdir)/ruby/backward/2/bool.h
-date_strptime.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
date_strptime.o: $(hdrdir)/ruby/backward/2/inttypes.h
date_strptime.o: $(hdrdir)/ruby/backward/2/limits.h
date_strptime.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/date/lib/date.rb b/ext/date/lib/date.rb
index 49012195031..5770187a8e3 100644
--- a/ext/date/lib/date.rb
+++ b/ext/date/lib/date.rb
@@ -4,6 +4,7 @@
require 'date_core'
class Date
+ VERSION = '3.2.2' # :nodoc:
def infinite?
false
diff --git a/ext/digest/bubblebabble/depend b/ext/digest/bubblebabble/depend
index b995438236b..28d4f472a97 100644
--- a/ext/digest/bubblebabble/depend
+++ b/ext/digest/bubblebabble/depend
@@ -2,6 +2,18 @@
bubblebabble.o: $(RUBY_EXTCONF_H)
bubblebabble.o: $(arch_hdrdir)/ruby/config.h
bubblebabble.o: $(hdrdir)/ruby.h
+bubblebabble.o: $(hdrdir)/ruby/assert.h
+bubblebabble.o: $(hdrdir)/ruby/backward.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/assume.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/attributes.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/bool.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/limits.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/long_long.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/stdarg.h
+bubblebabble.o: $(hdrdir)/ruby/defines.h
+bubblebabble.o: $(hdrdir)/ruby/intern.h
bubblebabble.o: $(hdrdir)/ruby/internal/anyargs.h
bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic.h
bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ bubblebabble.o: $(hdrdir)/ruby/internal/value_type.h
bubblebabble.o: $(hdrdir)/ruby/internal/variable.h
bubblebabble.o: $(hdrdir)/ruby/internal/warning_push.h
bubblebabble.o: $(hdrdir)/ruby/internal/xmalloc.h
-bubblebabble.o: $(hdrdir)/ruby/assert.h
-bubblebabble.o: $(hdrdir)/ruby/backward.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/assume.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/attributes.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/bool.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/inttypes.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/limits.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/long_long.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/stdalign.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/stdarg.h
-bubblebabble.o: $(hdrdir)/ruby/defines.h
-bubblebabble.o: $(hdrdir)/ruby/intern.h
bubblebabble.o: $(hdrdir)/ruby/missing.h
bubblebabble.o: $(hdrdir)/ruby/ruby.h
bubblebabble.o: $(hdrdir)/ruby/st.h
diff --git a/ext/digest/depend b/ext/digest/depend
index 856f9caa681..041ba8be518 100644
--- a/ext/digest/depend
+++ b/ext/digest/depend
@@ -2,6 +2,18 @@
digest.o: $(RUBY_EXTCONF_H)
digest.o: $(arch_hdrdir)/ruby/config.h
digest.o: $(hdrdir)/ruby.h
+digest.o: $(hdrdir)/ruby/assert.h
+digest.o: $(hdrdir)/ruby/backward.h
+digest.o: $(hdrdir)/ruby/backward/2/assume.h
+digest.o: $(hdrdir)/ruby/backward/2/attributes.h
+digest.o: $(hdrdir)/ruby/backward/2/bool.h
+digest.o: $(hdrdir)/ruby/backward/2/inttypes.h
+digest.o: $(hdrdir)/ruby/backward/2/limits.h
+digest.o: $(hdrdir)/ruby/backward/2/long_long.h
+digest.o: $(hdrdir)/ruby/backward/2/stdalign.h
+digest.o: $(hdrdir)/ruby/backward/2/stdarg.h
+digest.o: $(hdrdir)/ruby/defines.h
+digest.o: $(hdrdir)/ruby/intern.h
digest.o: $(hdrdir)/ruby/internal/anyargs.h
digest.o: $(hdrdir)/ruby/internal/arithmetic.h
digest.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ digest.o: $(hdrdir)/ruby/internal/value_type.h
digest.o: $(hdrdir)/ruby/internal/variable.h
digest.o: $(hdrdir)/ruby/internal/warning_push.h
digest.o: $(hdrdir)/ruby/internal/xmalloc.h
-digest.o: $(hdrdir)/ruby/assert.h
-digest.o: $(hdrdir)/ruby/backward.h
-digest.o: $(hdrdir)/ruby/backward/2/assume.h
-digest.o: $(hdrdir)/ruby/backward/2/attributes.h
-digest.o: $(hdrdir)/ruby/backward/2/bool.h
-digest.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-digest.o: $(hdrdir)/ruby/backward/2/inttypes.h
-digest.o: $(hdrdir)/ruby/backward/2/limits.h
-digest.o: $(hdrdir)/ruby/backward/2/long_long.h
-digest.o: $(hdrdir)/ruby/backward/2/stdalign.h
-digest.o: $(hdrdir)/ruby/backward/2/stdarg.h
-digest.o: $(hdrdir)/ruby/defines.h
-digest.o: $(hdrdir)/ruby/intern.h
digest.o: $(hdrdir)/ruby/missing.h
digest.o: $(hdrdir)/ruby/ruby.h
digest.o: $(hdrdir)/ruby/st.h
diff --git a/ext/digest/digest.gemspec b/ext/digest/digest.gemspec
index 7a4291c7ca9..4a01c5fde16 100644
--- a/ext/digest/digest.gemspec
+++ b/ext/digest/digest.gemspec
@@ -2,8 +2,13 @@
# frozen_string_literal: true
Gem::Specification.new do |spec|
+ version_module = Module.new do
+ version_rb = File.join(__dir__, "lib/digest/version.rb")
+ module_eval(File.read(version_rb), version_rb)
+ end
+
spec.name = "digest"
- spec.version = "3.1.0.pre2"
+ spec.version = version_module::Digest::VERSION
spec.authors = ["Akinori MUSHA"]
spec.email = ["knu@idaemons.org"]
@@ -31,7 +36,7 @@ Gem::Specification.new do |spec|
else
spec.extensions = Dir["ext/digest/**/extconf.rb"]
- spec.files += Dir["ext/digest/**/*.{rb,c,h,sh}"]
+ spec.files += Dir["ext/digest/**/{*.{rb,c,h,sh},depend}"]
spec.require_paths = %w[lib]
end
diff --git a/ext/digest/extconf.rb b/ext/digest/extconf.rb
index a8c68850a29..0e5f08d7947 100644
--- a/ext/digest/extconf.rb
+++ b/ext/digest/extconf.rb
@@ -6,6 +6,6 @@ require "mkmf"
$INSTALLFILES = {
"digest.h" => "$(HDRDIR)"
-}
+} if $extmk
create_makefile("digest")
diff --git a/ext/digest/lib/digest.rb b/ext/digest/lib/digest.rb
index 7cb0d2c3187..e995adb4501 100644
--- a/ext/digest/lib/digest.rb
+++ b/ext/digest/lib/digest.rb
@@ -1,24 +1,23 @@
# frozen_string_literal: false
-# The gem and bundle commands (except for bundle exec) first load
-# digest via openssl and then load gems, so if this is installed via
-# gem, we are overwriting the default version of digest. Beware not
-# to break it or cause redefinition warnings.
-#
-# When we introduce incompatible changes and overwriting is not an
-# option, and given that the default version does not have security
-# defects, we may just give up and let those commands just use the
-# default version of digest.
-#
-# return if defined?(Digest) && caller_locations.any? { |l|
-# %r{/(rubygems/gem_runner|bundler/cli)\.rb}.match?(l.path)
-# }
+if defined?(Digest) &&
+ /\A(?:2\.|3\.0\.[0-2]\z)/.match?(RUBY_VERSION) &&
+ caller_locations.any? { |l|
+ %r{/(rubygems/gem_runner|bundler/cli)\.rb}.match?(l.path)
+ }
+ # Before Ruby 3.0.3/3.1.0, the gem and bundle commands used to load
+ # the digest library before loading additionally installed gems, so
+ # you will get constant redefinition warnings and unexpected
+ # implementation overwriting if we proceed here. Avoid that.
+ return
+end
+require 'digest/version'
require 'digest/loader'
module Digest
# A mutex for Digest().
- REQUIRE_MUTEX ||= Thread::Mutex.new
+ REQUIRE_MUTEX = Thread::Mutex.new
def self.const_missing(name) # :nodoc:
case name
diff --git a/ext/digest/lib/digest/version.rb b/ext/digest/lib/digest/version.rb
new file mode 100644
index 00000000000..79e6aeee99e
--- /dev/null
+++ b/ext/digest/lib/digest/version.rb
@@ -0,0 +1,5 @@
+# frozen_string_literal: true
+
+module Digest
+ VERSION = "3.1.0"
+end
diff --git a/ext/digest/md5/depend b/ext/digest/md5/depend
index 258ec88e54d..2e07652cc52 100644
--- a/ext/digest/md5/depend
+++ b/ext/digest/md5/depend
@@ -10,7 +10,6 @@ md5.o: $(hdrdir)/ruby/backward.h
md5.o: $(hdrdir)/ruby/backward/2/assume.h
md5.o: $(hdrdir)/ruby/backward/2/attributes.h
md5.o: $(hdrdir)/ruby/backward/2/bool.h
-md5.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
md5.o: $(hdrdir)/ruby/backward/2/inttypes.h
md5.o: $(hdrdir)/ruby/backward/2/limits.h
md5.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -172,7 +171,6 @@ md5init.o: $(hdrdir)/ruby/backward.h
md5init.o: $(hdrdir)/ruby/backward/2/assume.h
md5init.o: $(hdrdir)/ruby/backward/2/attributes.h
md5init.o: $(hdrdir)/ruby/backward/2/bool.h
-md5init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
md5init.o: $(hdrdir)/ruby/backward/2/inttypes.h
md5init.o: $(hdrdir)/ruby/backward/2/limits.h
md5init.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/digest/md5/md5.c b/ext/digest/md5/md5.c
index 19fe54a6934..3a7fe2cdad2 100644
--- a/ext/digest/md5/md5.c
+++ b/ext/digest/md5/md5.c
@@ -225,7 +225,7 @@ md5_process(MD5_CTX *pms, const uint8_t *data /*[64]*/)
uint32_t xbuf[16];
const uint32_t *X;
- if (!((data - (const uint8_t *)0) & 3)) {
+ if (!(((uintptr_t)data) & 3)) {
/* data are properly aligned */
X = (const uint32_t *)data;
} else {
diff --git a/ext/digest/rmd160/depend b/ext/digest/rmd160/depend
index 8a7f5557544..fe3652a2f62 100644
--- a/ext/digest/rmd160/depend
+++ b/ext/digest/rmd160/depend
@@ -10,7 +10,6 @@ rmd160.o: $(hdrdir)/ruby/backward.h
rmd160.o: $(hdrdir)/ruby/backward/2/assume.h
rmd160.o: $(hdrdir)/ruby/backward/2/attributes.h
rmd160.o: $(hdrdir)/ruby/backward/2/bool.h
-rmd160.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
rmd160.o: $(hdrdir)/ruby/backward/2/inttypes.h
rmd160.o: $(hdrdir)/ruby/backward/2/limits.h
rmd160.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -172,7 +171,6 @@ rmd160init.o: $(hdrdir)/ruby/backward.h
rmd160init.o: $(hdrdir)/ruby/backward/2/assume.h
rmd160init.o: $(hdrdir)/ruby/backward/2/attributes.h
rmd160init.o: $(hdrdir)/ruby/backward/2/bool.h
-rmd160init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
rmd160init.o: $(hdrdir)/ruby/backward/2/inttypes.h
rmd160init.o: $(hdrdir)/ruby/backward/2/limits.h
rmd160init.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/digest/sha1/depend b/ext/digest/sha1/depend
index 055e1fbaa08..2b73455c035 100644
--- a/ext/digest/sha1/depend
+++ b/ext/digest/sha1/depend
@@ -10,7 +10,6 @@ sha1.o: $(hdrdir)/ruby/backward.h
sha1.o: $(hdrdir)/ruby/backward/2/assume.h
sha1.o: $(hdrdir)/ruby/backward/2/attributes.h
sha1.o: $(hdrdir)/ruby/backward/2/bool.h
-sha1.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
sha1.o: $(hdrdir)/ruby/backward/2/inttypes.h
sha1.o: $(hdrdir)/ruby/backward/2/limits.h
sha1.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -172,7 +171,6 @@ sha1init.o: $(hdrdir)/ruby/backward.h
sha1init.o: $(hdrdir)/ruby/backward/2/assume.h
sha1init.o: $(hdrdir)/ruby/backward/2/attributes.h
sha1init.o: $(hdrdir)/ruby/backward/2/bool.h
-sha1init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
sha1init.o: $(hdrdir)/ruby/backward/2/inttypes.h
sha1init.o: $(hdrdir)/ruby/backward/2/limits.h
sha1init.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/digest/sha2/depend b/ext/digest/sha2/depend
index c3399e76f56..b3e52c644ed 100644
--- a/ext/digest/sha2/depend
+++ b/ext/digest/sha2/depend
@@ -10,7 +10,6 @@ sha2.o: $(hdrdir)/ruby/backward.h
sha2.o: $(hdrdir)/ruby/backward/2/assume.h
sha2.o: $(hdrdir)/ruby/backward/2/attributes.h
sha2.o: $(hdrdir)/ruby/backward/2/bool.h
-sha2.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
sha2.o: $(hdrdir)/ruby/backward/2/inttypes.h
sha2.o: $(hdrdir)/ruby/backward/2/limits.h
sha2.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -172,7 +171,6 @@ sha2init.o: $(hdrdir)/ruby/backward.h
sha2init.o: $(hdrdir)/ruby/backward/2/assume.h
sha2init.o: $(hdrdir)/ruby/backward/2/attributes.h
sha2init.o: $(hdrdir)/ruby/backward/2/bool.h
-sha2init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
sha2init.o: $(hdrdir)/ruby/backward/2/inttypes.h
sha2init.o: $(hdrdir)/ruby/backward/2/limits.h
sha2init.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/digest/sha2/sha2.c b/ext/digest/sha2/sha2.c
index e7d7b15c5b3..21d5acbe964 100644
--- a/ext/digest/sha2/sha2.c
+++ b/ext/digest/sha2/sha2.c
@@ -128,7 +128,7 @@ typedef u_int64_t sha2_word64; /* Exactly 8 bytes */
#define SHA512_SHORT_BLOCK_LENGTH (SHA512_BLOCK_LENGTH - 16)
-#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || defined(__GNUC__) || defined(_HPUX_SOURCE) || defined(__IBMC__)
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || defined(__GNUC__) || defined(__IBMC__)
#define ULL(number) number##ULL
#else
#define ULL(number) (uint64_t)(number)
diff --git a/ext/etc/depend b/ext/etc/depend
index 2ecd521ef99..9c2de2ba964 100644
--- a/ext/etc/depend
+++ b/ext/etc/depend
@@ -12,7 +12,6 @@ etc.o: $(hdrdir)/ruby/backward.h
etc.o: $(hdrdir)/ruby/backward/2/assume.h
etc.o: $(hdrdir)/ruby/backward/2/attributes.h
etc.o: $(hdrdir)/ruby/backward/2/bool.h
-etc.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
etc.o: $(hdrdir)/ruby/backward/2/inttypes.h
etc.o: $(hdrdir)/ruby/backward/2/limits.h
etc.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 737d295abc6..9a691d6e34f 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -52,7 +52,7 @@ char *getenv();
#endif
char *getlogin();
-#define RUBY_ETC_VERSION "1.3.0"
+#define RUBY_ETC_VERSION "1.4.0"
#ifdef HAVE_RB_DEPRECATE_CONSTANT
void rb_deprecate_constant(VALUE mod, const char *name);
@@ -1158,8 +1158,7 @@ Init_etc(void)
#endif
NULL);
#if 0
- /* Define-const: Passwd
- *
+ /*
* Passwd is a Struct that contains the following members:
*
* name::
@@ -1197,12 +1196,11 @@ Init_etc(void)
* expire::
* account expiration time(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_EXPIRE+
*/
- rb_define_const(mEtc, "Passwd", sPasswd);
+ sPasswd = rb_define_class_under(mEtc, "Passwd", rb_cStruct);
#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);
+
#ifdef HAVE_GETGRENT
sGroup = rb_struct_define_under(mEtc, "Group", "name",
#ifdef HAVE_STRUCT_GROUP_GR_PASSWD
@@ -1211,8 +1209,7 @@ Init_etc(void)
"gid", "mem", NULL);
#if 0
- /* Define-const: Group
- *
+ /*
* Group is a Struct that is only available when compiled with +HAVE_GETGRENT+.
*
* The struct contains the following members:
@@ -1220,11 +1217,10 @@ Init_etc(void)
* name::
* contains the name of the group as a String.
* passwd::
- * contains the encrypted password as a String. An 'x' is
+ * contains the encrypted password as a String. An <code>'x'</code> is
* returned if password access to the group is not available; an empty
* string is returned if no password is needed to obtain membership of
* the group.
- *
* Must be compiled with +HAVE_STRUCT_GROUP_GR_PASSWD+.
* gid::
* contains the group's numeric ID as an integer.
@@ -1232,10 +1228,8 @@ Init_etc(void)
* is an Array of Strings containing the short login names of the
* members of the group.
*/
- rb_define_const(mEtc, "Group", sGroup);
+ sGroup = rb_define_class_under(mEtc, "Group", rb_cStruct);
#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/etc.gemspec b/ext/etc/etc.gemspec
index 7d687e3b99a..98c6d66faa8 100644
--- a/ext/etc/etc.gemspec
+++ b/ext/etc/etc.gemspec
@@ -22,23 +22,22 @@ Gem::Specification.new do |spec|
spec.homepage = "https://github.com/ruby/etc"
spec.licenses = ["Ruby", "BSD-2-Clause"]
+ changelogs = Dir.glob("logs/ChangeLog-[1-9]*[^~]", base: __dir__)
spec.files = %w[
LICENSE.txt
README.md
+ ChangeLog
ext/etc/constdefs.h
ext/etc/etc.c
ext/etc/extconf.rb
ext/etc/mkconstants.rb
test/etc/test_etc.rb
- ]
+ ] + changelogs
+ spec.rdoc_options = ["--main", "README.md"]
+ spec.extra_rdoc_files = spec.files.grep_v(/\.{rb,[ch]}\z/)
spec.bindir = "exe"
spec.require_paths = ["lib"]
spec.extensions = %w{ext/etc/extconf.rb}
- spec.required_ruby_version = ">= 2.3.0"
-
- spec.add_development_dependency "bundler"
- spec.add_development_dependency "rake"
- spec.add_development_dependency "rake-compiler"
- spec.add_development_dependency "test-unit"
+ spec.required_ruby_version = ">= 2.6.0"
end
diff --git a/ext/etc/extconf.rb b/ext/etc/extconf.rb
index 6e7810a5e87..159b1614b7d 100644
--- a/ext/etc/extconf.rb
+++ b/ext/etc/extconf.rb
@@ -47,6 +47,7 @@ if !File.exist?("#{srcdir}/depend")
%x[#{RbConfig.ruby} #{srcdir}/mkconstants.rb -o #{srcdir}/constdefs.h]
end
+# TODO: remove when dropping 2.7 support, as exported since 3.0
have_func('rb_deprecate_constant(Qnil, "None")')
$distcleanfiles << "constdefs.h"
diff --git a/ext/fcntl/depend b/ext/fcntl/depend
index 720b67d9bf9..46a9e781722 100644
--- a/ext/fcntl/depend
+++ b/ext/fcntl/depend
@@ -2,6 +2,18 @@
fcntl.o: $(RUBY_EXTCONF_H)
fcntl.o: $(arch_hdrdir)/ruby/config.h
fcntl.o: $(hdrdir)/ruby.h
+fcntl.o: $(hdrdir)/ruby/assert.h
+fcntl.o: $(hdrdir)/ruby/backward.h
+fcntl.o: $(hdrdir)/ruby/backward/2/assume.h
+fcntl.o: $(hdrdir)/ruby/backward/2/attributes.h
+fcntl.o: $(hdrdir)/ruby/backward/2/bool.h
+fcntl.o: $(hdrdir)/ruby/backward/2/inttypes.h
+fcntl.o: $(hdrdir)/ruby/backward/2/limits.h
+fcntl.o: $(hdrdir)/ruby/backward/2/long_long.h
+fcntl.o: $(hdrdir)/ruby/backward/2/stdalign.h
+fcntl.o: $(hdrdir)/ruby/backward/2/stdarg.h
+fcntl.o: $(hdrdir)/ruby/defines.h
+fcntl.o: $(hdrdir)/ruby/intern.h
fcntl.o: $(hdrdir)/ruby/internal/anyargs.h
fcntl.o: $(hdrdir)/ruby/internal/arithmetic.h
fcntl.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ fcntl.o: $(hdrdir)/ruby/internal/value_type.h
fcntl.o: $(hdrdir)/ruby/internal/variable.h
fcntl.o: $(hdrdir)/ruby/internal/warning_push.h
fcntl.o: $(hdrdir)/ruby/internal/xmalloc.h
-fcntl.o: $(hdrdir)/ruby/assert.h
-fcntl.o: $(hdrdir)/ruby/backward.h
-fcntl.o: $(hdrdir)/ruby/backward/2/assume.h
-fcntl.o: $(hdrdir)/ruby/backward/2/attributes.h
-fcntl.o: $(hdrdir)/ruby/backward/2/bool.h
-fcntl.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-fcntl.o: $(hdrdir)/ruby/backward/2/inttypes.h
-fcntl.o: $(hdrdir)/ruby/backward/2/limits.h
-fcntl.o: $(hdrdir)/ruby/backward/2/long_long.h
-fcntl.o: $(hdrdir)/ruby/backward/2/stdalign.h
-fcntl.o: $(hdrdir)/ruby/backward/2/stdarg.h
-fcntl.o: $(hdrdir)/ruby/defines.h
-fcntl.o: $(hdrdir)/ruby/intern.h
fcntl.o: $(hdrdir)/ruby/missing.h
fcntl.o: $(hdrdir)/ruby/ruby.h
fcntl.o: $(hdrdir)/ruby/st.h
diff --git a/ext/fcntl/fcntl.c b/ext/fcntl/fcntl.c
index ee42d2abe5e..3bccc41e4c4 100644
--- a/ext/fcntl/fcntl.c
+++ b/ext/fcntl/fcntl.c
@@ -256,4 +256,21 @@ Init_fcntl(void)
*/
rb_define_const(mFcntl, "O_ACCMODE", INT2FIX(O_RDONLY | O_WRONLY | O_RDWR));
#endif
+#ifdef F_DUP2FD
+ /* Document-const: F_DUP2FD
+ *
+ * It is a FreeBSD specific constant and equivalent
+ * to dup2 call.
+ */
+ rb_define_const(mFcntl, "F_DUP2FD", INT2NUM(F_DUP2FD));
+#endif
+#ifdef F_DUP2FD_CLOEXEC
+ /* Document-const: F_DUP2FD_CLOEXEC
+ *
+ * It is a FreeBSD specific constant and acts
+ * similarly as F_DUP2FD but set the FD_CLOEXEC
+ * flag in addition.
+ */
+ rb_define_const(mFcntl, "F_DUP2FD_CLOEXEC", INT2NUM(F_DUP2FD_CLOEXEC));
+#endif
}
diff --git a/ext/fiddle/depend b/ext/fiddle/depend
index f16320db363..4d33d46d33f 100644
--- a/ext/fiddle/depend
+++ b/ext/fiddle/depend
@@ -60,7 +60,6 @@ closure.o: $(hdrdir)/ruby/backward.h
closure.o: $(hdrdir)/ruby/backward/2/assume.h
closure.o: $(hdrdir)/ruby/backward/2/attributes.h
closure.o: $(hdrdir)/ruby/backward/2/bool.h
-closure.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
closure.o: $(hdrdir)/ruby/backward/2/inttypes.h
closure.o: $(hdrdir)/ruby/backward/2/limits.h
closure.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -225,7 +224,6 @@ conversions.o: $(hdrdir)/ruby/backward.h
conversions.o: $(hdrdir)/ruby/backward/2/assume.h
conversions.o: $(hdrdir)/ruby/backward/2/attributes.h
conversions.o: $(hdrdir)/ruby/backward/2/bool.h
-conversions.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
conversions.o: $(hdrdir)/ruby/backward/2/inttypes.h
conversions.o: $(hdrdir)/ruby/backward/2/limits.h
conversions.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -389,7 +387,6 @@ fiddle.o: $(hdrdir)/ruby/backward.h
fiddle.o: $(hdrdir)/ruby/backward/2/assume.h
fiddle.o: $(hdrdir)/ruby/backward/2/attributes.h
fiddle.o: $(hdrdir)/ruby/backward/2/bool.h
-fiddle.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
fiddle.o: $(hdrdir)/ruby/backward/2/inttypes.h
fiddle.o: $(hdrdir)/ruby/backward/2/limits.h
fiddle.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -553,7 +550,6 @@ function.o: $(hdrdir)/ruby/backward.h
function.o: $(hdrdir)/ruby/backward/2/assume.h
function.o: $(hdrdir)/ruby/backward/2/attributes.h
function.o: $(hdrdir)/ruby/backward/2/bool.h
-function.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
function.o: $(hdrdir)/ruby/backward/2/inttypes.h
function.o: $(hdrdir)/ruby/backward/2/limits.h
function.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -718,7 +714,6 @@ handle.o: $(hdrdir)/ruby/backward.h
handle.o: $(hdrdir)/ruby/backward/2/assume.h
handle.o: $(hdrdir)/ruby/backward/2/attributes.h
handle.o: $(hdrdir)/ruby/backward/2/bool.h
-handle.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
handle.o: $(hdrdir)/ruby/backward/2/inttypes.h
handle.o: $(hdrdir)/ruby/backward/2/limits.h
handle.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -882,7 +877,6 @@ memory_view.o: $(hdrdir)/ruby/backward.h
memory_view.o: $(hdrdir)/ruby/backward/2/assume.h
memory_view.o: $(hdrdir)/ruby/backward/2/attributes.h
memory_view.o: $(hdrdir)/ruby/backward/2/bool.h
-memory_view.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
memory_view.o: $(hdrdir)/ruby/backward/2/inttypes.h
memory_view.o: $(hdrdir)/ruby/backward/2/limits.h
memory_view.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -1059,7 +1053,6 @@ pinned.o: $(hdrdir)/ruby/backward.h
pinned.o: $(hdrdir)/ruby/backward/2/assume.h
pinned.o: $(hdrdir)/ruby/backward/2/attributes.h
pinned.o: $(hdrdir)/ruby/backward/2/bool.h
-pinned.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
pinned.o: $(hdrdir)/ruby/backward/2/inttypes.h
pinned.o: $(hdrdir)/ruby/backward/2/limits.h
pinned.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -1223,7 +1216,6 @@ pointer.o: $(hdrdir)/ruby/backward.h
pointer.o: $(hdrdir)/ruby/backward/2/assume.h
pointer.o: $(hdrdir)/ruby/backward/2/attributes.h
pointer.o: $(hdrdir)/ruby/backward/2/bool.h
-pointer.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
pointer.o: $(hdrdir)/ruby/backward/2/inttypes.h
pointer.o: $(hdrdir)/ruby/backward/2/limits.h
pointer.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb
index 053456d534d..93b4f9d4faf 100644
--- a/ext/fiddle/extconf.rb
+++ b/ext/fiddle/extconf.rb
@@ -167,7 +167,7 @@ if libffi_version
libffi_version = libffi_version.gsub(/-rc\d+/, '')
libffi_version = (libffi_version.split('.').map(&:to_i) + [0,0])[0,3]
$defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % libffi_version }})
- warn "libffi_version: #{libffi_version.join('.')}"
+ puts "libffi_version: #{libffi_version.join('.')}"
end
case
diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index 5dec1a4c068..4ec24178c4a 100644
--- a/ext/io/console/console.c
+++ b/ext/io/console/console.c
@@ -90,6 +90,10 @@ extern VALUE rb_scheduler_timeout(struct timeval *timeout);
#define sys_fail_fptr(fptr) rb_sys_fail_str((fptr)->pathv)
#ifndef HAVE_RB_F_SEND
+#ifndef RB_PASS_CALLED_KEYWORDS
+# define rb_funcallv_kw(recv, mid, arg, argv, kw_splat) rb_funcallv(recv, mid, arg, argv)
+#endif
+
static ID id___send__;
static VALUE
@@ -104,7 +108,7 @@ rb_f_send(int argc, VALUE *argv, VALUE recv)
else {
vid = id___send__;
}
- return rb_funcallv(recv, vid, argc, argv);
+ return rb_funcallv_kw(recv, vid, argc, argv, RB_PASS_CALLED_KEYWORDS);
}
#endif
@@ -555,8 +559,8 @@ console_getch(int argc, VALUE *argv, VALUE io)
if (w < 0) rb_eof_error();
if (!(w & RB_WAITFD_IN)) return Qnil;
# else
- VALUE result = rb_io_wait(io, RUBY_IO_READABLE, timeout);
- if (result == Qfalse) return Qnil;
+ VALUE result = rb_io_wait(io, RB_INT2NUM(RUBY_IO_READABLE), timeout);
+ if (!RTEST(result)) return Qnil;
# endif
}
else if (optp->vtime) {
diff --git a/ext/io/console/depend b/ext/io/console/depend
index b28df55fe78..e6014dcc59f 100644
--- a/ext/io/console/depend
+++ b/ext/io/console/depend
@@ -7,7 +7,6 @@ console.o: $(hdrdir)/ruby/backward.h
console.o: $(hdrdir)/ruby/backward/2/assume.h
console.o: $(hdrdir)/ruby/backward/2/attributes.h
console.o: $(hdrdir)/ruby/backward/2/bool.h
-console.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
console.o: $(hdrdir)/ruby/backward/2/inttypes.h
console.o: $(hdrdir)/ruby/backward/2/limits.h
console.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/io/console/io-console.gemspec b/ext/io/console/io-console.gemspec
index dabe9e68f82..aa57f8ac521 100644
--- a/ext/io/console/io-console.gemspec
+++ b/ext/io/console/io-console.gemspec
@@ -1,5 +1,5 @@
# -*- ruby -*-
-_VERSION = "0.5.9"
+_VERSION = "0.5.11"
Gem::Specification.new do |s|
s.name = "io-console"
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
s.summary = "Console interface"
s.email = "nobu@ruby-lang.org"
s.description = "add console capabilities to IO instances."
- s.required_ruby_version = ">= 2.4.0"
+ s.required_ruby_version = ">= 2.6.0"
s.homepage = "https://github.com/ruby/io-console"
s.metadata["source_code_url"] = s.homepage
s.authors = ["Nobu Nakada"]
diff --git a/ext/io/nonblock/depend b/ext/io/nonblock/depend
index 95948937ee0..664c262e352 100644
--- a/ext/io/nonblock/depend
+++ b/ext/io/nonblock/depend
@@ -7,7 +7,6 @@ nonblock.o: $(hdrdir)/ruby/backward.h
nonblock.o: $(hdrdir)/ruby/backward/2/assume.h
nonblock.o: $(hdrdir)/ruby/backward/2/attributes.h
nonblock.o: $(hdrdir)/ruby/backward/2/bool.h
-nonblock.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
nonblock.o: $(hdrdir)/ruby/backward/2/inttypes.h
nonblock.o: $(hdrdir)/ruby/backward/2/limits.h
nonblock.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/io/wait/depend b/ext/io/wait/depend
index 3c4657795b8..0426a6a1ede 100644
--- a/ext/io/wait/depend
+++ b/ext/io/wait/depend
@@ -1,4 +1,5 @@
# AUTOGENERATED DEPENDENCIES START
+# wait.o: $(hdrdir)/ruby/assert.h # not in 2.6
wait.o: $(RUBY_EXTCONF_H)
wait.o: $(arch_hdrdir)/ruby/config.h
wait.o: $(hdrdir)/ruby.h
@@ -7,7 +8,6 @@ wait.o: $(hdrdir)/ruby/backward.h
wait.o: $(hdrdir)/ruby/backward/2/assume.h
wait.o: $(hdrdir)/ruby/backward/2/attributes.h
wait.o: $(hdrdir)/ruby/backward/2/bool.h
-wait.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
wait.o: $(hdrdir)/ruby/backward/2/inttypes.h
wait.o: $(hdrdir)/ruby/backward/2/limits.h
wait.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/io/wait/extconf.rb b/ext/io/wait/extconf.rb
index b5d36c3fe33..d20ff4553f9 100644
--- a/ext/io/wait/extconf.rb
+++ b/ext/io/wait/extconf.rb
@@ -2,6 +2,7 @@
require 'mkmf'
target = "io/wait"
+have_func("rb_io_wait")
unless macro_defined?("DOSISH", "#include <ruby.h>")
have_header(ioctl_h = "sys/ioctl.h") or ioctl_h = nil
fionread = %w[sys/ioctl.h sys/filio.h sys/socket.h].find do |h|
diff --git a/ext/io/wait/io-wait.gemspec b/ext/io/wait/io-wait.gemspec
index ec23699def2..ec7c05dd871 100644
--- a/ext/io/wait/io-wait.gemspec
+++ b/ext/io/wait/io-wait.gemspec
@@ -1,4 +1,4 @@
-_VERSION = "0.2.0"
+_VERSION = "0.2.1"
Gem::Specification.new do |spec|
spec.name = "io-wait"
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
spec.description = %q{Waits until IO is readable or writable without blocking.}
spec.homepage = "https://github.com/ruby/io-wait"
spec.licenses = ["Ruby", "BSD-2-Clause"]
- spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
diff --git a/ext/io/wait/wait.c b/ext/io/wait/wait.c
index 512e4f6a80d..568c7b54a8c 100644
--- a/ext/io/wait/wait.c
+++ b/ext/io/wait/wait.c
@@ -40,23 +40,57 @@
#define FIONREAD_POSSIBLE_P(fd) ((void)(fd),Qtrue)
#endif
+#ifndef HAVE_RB_IO_WAIT
+static VALUE io_ready_p _((VALUE io));
+static VALUE io_wait_readable _((int argc, VALUE *argv, VALUE io));
+static VALUE io_wait_writable _((int argc, VALUE *argv, VALUE io));
+void Init_wait _((void));
+
+static struct timeval *
+get_timeout(int argc, VALUE *argv, struct timeval *timerec)
+{
+ VALUE timeout = Qnil;
+ rb_check_arity(argc, 0, 1);
+ if (!argc || NIL_P(timeout = argv[0])) {
+ return NULL;
+ }
+ else {
+ *timerec = rb_time_interval(timeout);
+ return timerec;
+ }
+}
+
+static int
+wait_for_single_fd(rb_io_t *fptr, int events, struct timeval *tv)
+{
+ int i = rb_wait_for_single_fd(fptr->fd, events, tv);
+ if (i < 0)
+ rb_sys_fail(0);
+ rb_io_check_closed(fptr);
+ return (i & events);
+}
+#endif
+
/*
* call-seq:
* io.nread -> int
*
* Returns number of bytes that can be read without blocking.
* Returns zero if no information available.
+ *
+ * You must require 'io/wait' to use this method.
*/
static VALUE
io_nread(VALUE io)
{
- rb_io_t *fptr = NULL;
+ rb_io_t *fptr;
+ int len;
ioctl_arg n;
GetOpenFile(io, fptr);
rb_io_check_readable(fptr);
- int len = rb_io_read_pending(fptr);
+ len = rb_io_read_pending(fptr);
if (len > 0) return INT2FIX(len);
if (!FIONREAD_POSSIBLE_P(fptr->fd)) return INT2FIX(0);
if (ioctl(fptr->fd, FIONREAD, &n)) return INT2FIX(0);
@@ -64,6 +98,7 @@ io_nread(VALUE io)
return INT2FIX(0);
}
+#ifdef HAVE_RB_IO_WAIT
static VALUE
io_wait_event(VALUE io, int event, VALUE timeout)
{
@@ -82,81 +117,128 @@ io_wait_event(VALUE io, int event, VALUE timeout)
return Qfalse;
}
}
+#endif
/*
* call-seq:
- * io.ready? -> true or false
+ * io.ready? -> truthy or falsy
*
- * Returns +true+ if input available without blocking, or +false+.
+ * Returns a truthy value if input available without blocking, or a
+ * falsy value.
+ *
+ * You must require 'io/wait' to use this method.
*/
static VALUE
io_ready_p(VALUE io)
{
rb_io_t *fptr;
+#ifndef HAVE_RB_IO_WAIT
+ struct timeval tv = {0, 0};
+#endif
GetOpenFile(io, fptr);
rb_io_check_readable(fptr);
if (rb_io_read_pending(fptr)) return Qtrue;
- return io_wait_event(io, RUBY_IO_READABLE, RB_INT2NUM(0));
+#ifndef HAVE_RB_IO_WAIT
+ if (wait_for_single_fd(fptr, RB_WAITFD_IN, &tv))
+ return Qtrue;
+#else
+ if (RTEST(io_wait_event(io, RUBY_IO_READABLE, RB_INT2NUM(0))))
+ return Qtrue;
+#endif
+ return Qfalse;
}
/*
* call-seq:
- * io.wait_readable -> true or false
- * io.wait_readable(timeout) -> true or false
+ * io.wait_readable -> truthy or falsy
+ * io.wait_readable(timeout) -> truthy or falsy
+ *
+ * Waits until IO is readable and returns a truthy value, or a falsy
+ * value when times out. Returns a truthy value immediately when
+ * buffered data is available.
*
- * Waits until IO is readable and returns +true+, or
- * +false+ when times out.
- * Returns +true+ immediately when buffered data is available.
+ * You must require 'io/wait' to use this method.
*/
static VALUE
io_wait_readable(int argc, VALUE *argv, VALUE io)
{
- rb_io_t *fptr = NULL;
+ rb_io_t *fptr;
+#ifndef HAVE_RB_IO_WAIT
+ struct timeval timerec;
+ struct timeval *tv;
+#endif
- RB_IO_POINTER(io, fptr);
+ GetOpenFile(io, fptr);
rb_io_check_readable(fptr);
+#ifndef HAVE_RB_IO_WAIT
+ tv = get_timeout(argc, argv, &timerec);
+#endif
if (rb_io_read_pending(fptr)) return Qtrue;
+#ifndef HAVE_RB_IO_WAIT
+ if (wait_for_single_fd(fptr, RB_WAITFD_IN, tv)) {
+ return io;
+ }
+ return Qnil;
+#else
rb_check_arity(argc, 0, 1);
VALUE timeout = (argc == 1 ? argv[0] : Qnil);
return io_wait_event(io, RUBY_IO_READABLE, timeout);
+#endif
}
/*
* call-seq:
- * io.wait_writable -> true or false
- * io.wait_writable(timeout) -> true or false
+ * io.wait_writable -> truthy or falsy
+ * io.wait_writable(timeout) -> truthy or falsy
*
- * Waits until IO is writable and returns +true+ or
- * +false+ when times out.
+ * Waits until IO is writable and returns a truthy value or a falsy
+ * value when times out.
+ *
+ * You must require 'io/wait' to use this method.
*/
static VALUE
io_wait_writable(int argc, VALUE *argv, VALUE io)
{
- rb_io_t *fptr = NULL;
+ rb_io_t *fptr;
+#ifndef HAVE_RB_IO_WAIT
+ struct timeval timerec;
+ struct timeval *tv;
+#endif
- RB_IO_POINTER(io, fptr);
+ GetOpenFile(io, fptr);
rb_io_check_writable(fptr);
+#ifndef HAVE_RB_IO_WAIT
+ tv = get_timeout(argc, argv, &timerec);
+ if (wait_for_single_fd(fptr, RB_WAITFD_OUT, tv)) {
+ return io;
+ }
+ return Qnil;
+#else
rb_check_arity(argc, 0, 1);
VALUE timeout = (argc == 1 ? argv[0] : Qnil);
return io_wait_event(io, RUBY_IO_WRITABLE, timeout);
+#endif
}
+#ifdef HAVE_RB_IO_WAIT
/*
* call-seq:
- * io.wait_priority -> true or false
- * io.wait_priority(timeout) -> true or false
+ * io.wait_priority -> truthy or falsy
+ * io.wait_priority(timeout) -> truthy or falsy
*
- * Waits until IO is priority and returns +true+ or
- * +false+ when times out.
+ * Waits until IO is priority and returns a truthy value or a falsy
+ * value when times out.
+ *
+ * You must require 'io/wait' to use this method.
*/
static VALUE
io_wait_priority(int argc, VALUE *argv, VALUE io)
@@ -173,6 +255,7 @@ io_wait_priority(int argc, VALUE *argv, VALUE io)
return io_wait_event(io, RUBY_IO_PRIORITY, timeout);
}
+#endif
static int
wait_mode_sym(VALUE mode)
@@ -210,24 +293,51 @@ wait_mode_sym(VALUE mode)
/*
* call-seq:
- * io.wait(events, timeout) -> event mask or false.
- * io.wait(timeout = nil, mode = :read) -> event mask or false.
+ * io.wait(events, timeout) -> truthy or falsy
+ * io.wait(timeout = nil, mode = :read) -> truthy or falsy.
*
* Waits until the IO becomes ready for the specified events and returns the
- * subset of events that become ready, or +false+ when times out.
+ * subset of events that become ready, or a falsy value when times out.
*
* The events can be a bit mask of +IO::READABLE+, +IO::WRITABLE+ or
* +IO::PRIORITY+.
*
- * Returns +true+ immediately when buffered data is available.
+ * Returns a truthy value immediately when buffered data is available.
*
* Optional parameter +mode+ is one of +:read+, +:write+, or
* +:read_write+.
+ *
+ * You must require 'io/wait' to use this method.
*/
static VALUE
io_wait(int argc, VALUE *argv, VALUE io)
{
+#ifndef HAVE_RB_IO_WAIT
+ rb_io_t *fptr;
+ struct timeval timerec;
+ struct timeval *tv = NULL;
+ int event = 0;
+ int i;
+
+ GetOpenFile(io, fptr);
+ for (i = 0; i < argc; ++i) {
+ if (SYMBOL_P(argv[i])) {
+ event |= wait_mode_sym(argv[i]);
+ }
+ else {
+ *(tv = &timerec) = rb_time_interval(argv[i]);
+ }
+ }
+ /* rb_time_interval() and might_mode() might convert the argument */
+ rb_io_check_closed(fptr);
+ if (!event) event = RB_WAITFD_IN;
+ if ((event & RB_WAITFD_IN) && rb_io_read_pending(fptr))
+ return Qtrue;
+ if (wait_for_single_fd(fptr, event, tv))
+ return io;
+ return Qnil;
+#else
VALUE timeout = Qundef;
rb_io_event_t events = 0;
@@ -264,6 +374,7 @@ io_wait(int argc, VALUE *argv, VALUE io)
}
return io_wait_event(io, events, timeout);
+#endif
}
/*
@@ -284,5 +395,7 @@ Init_wait(void)
rb_define_method(rb_cIO, "wait_readable", io_wait_readable, -1);
rb_define_method(rb_cIO, "wait_writable", io_wait_writable, -1);
+#ifdef HAVE_RB_IO_WAIT
rb_define_method(rb_cIO, "wait_priority", io_wait_priority, -1);
+#endif
}
diff --git a/ext/json/generator/depend b/ext/json/generator/depend
index 855e876cdbf..1de5fb0b93c 100644
--- a/ext/json/generator/depend
+++ b/ext/json/generator/depend
@@ -10,7 +10,6 @@ generator.o: $(hdrdir)/ruby/backward.h
generator.o: $(hdrdir)/ruby/backward/2/assume.h
generator.o: $(hdrdir)/ruby/backward/2/attributes.h
generator.o: $(hdrdir)/ruby/backward/2/bool.h
-generator.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
generator.o: $(hdrdir)/ruby/backward/2/inttypes.h
generator.o: $(hdrdir)/ruby/backward/2/limits.h
generator.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/json/parser/depend b/ext/json/parser/depend
index 1a75df405dd..df261fdfbb2 100644
--- a/ext/json/parser/depend
+++ b/ext/json/parser/depend
@@ -10,7 +10,6 @@ parser.o: $(hdrdir)/ruby/backward.h
parser.o: $(hdrdir)/ruby/backward/2/assume.h
parser.o: $(hdrdir)/ruby/backward/2/attributes.h
parser.o: $(hdrdir)/ruby/backward/2/bool.h
-parser.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
parser.o: $(hdrdir)/ruby/backward/2/inttypes.h
parser.o: $(hdrdir)/ruby/backward/2/limits.h
parser.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/monitor/depend b/ext/monitor/depend
index 2e3ba40928c..a8fca7f0b7e 100644
--- a/ext/monitor/depend
+++ b/ext/monitor/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
monitor.o: $(RUBY_EXTCONF_H)
monitor.o: $(arch_hdrdir)/ruby/config.h
+monitor.o: $(hdrdir)/ruby/assert.h
+monitor.o: $(hdrdir)/ruby/backward.h
+monitor.o: $(hdrdir)/ruby/backward/2/assume.h
+monitor.o: $(hdrdir)/ruby/backward/2/attributes.h
+monitor.o: $(hdrdir)/ruby/backward/2/bool.h
+monitor.o: $(hdrdir)/ruby/backward/2/inttypes.h
+monitor.o: $(hdrdir)/ruby/backward/2/limits.h
+monitor.o: $(hdrdir)/ruby/backward/2/long_long.h
+monitor.o: $(hdrdir)/ruby/backward/2/stdalign.h
+monitor.o: $(hdrdir)/ruby/backward/2/stdarg.h
+monitor.o: $(hdrdir)/ruby/defines.h
+monitor.o: $(hdrdir)/ruby/intern.h
monitor.o: $(hdrdir)/ruby/internal/anyargs.h
monitor.o: $(hdrdir)/ruby/internal/arithmetic.h
monitor.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ monitor.o: $(hdrdir)/ruby/internal/value_type.h
monitor.o: $(hdrdir)/ruby/internal/variable.h
monitor.o: $(hdrdir)/ruby/internal/warning_push.h
monitor.o: $(hdrdir)/ruby/internal/xmalloc.h
-monitor.o: $(hdrdir)/ruby/assert.h
-monitor.o: $(hdrdir)/ruby/backward.h
-monitor.o: $(hdrdir)/ruby/backward/2/assume.h
-monitor.o: $(hdrdir)/ruby/backward/2/attributes.h
-monitor.o: $(hdrdir)/ruby/backward/2/bool.h
-monitor.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-monitor.o: $(hdrdir)/ruby/backward/2/inttypes.h
-monitor.o: $(hdrdir)/ruby/backward/2/limits.h
-monitor.o: $(hdrdir)/ruby/backward/2/long_long.h
-monitor.o: $(hdrdir)/ruby/backward/2/stdalign.h
-monitor.o: $(hdrdir)/ruby/backward/2/stdarg.h
-monitor.o: $(hdrdir)/ruby/defines.h
-monitor.o: $(hdrdir)/ruby/intern.h
monitor.o: $(hdrdir)/ruby/missing.h
monitor.o: $(hdrdir)/ruby/ruby.h
monitor.o: $(hdrdir)/ruby/st.h
diff --git a/ext/nkf/depend b/ext/nkf/depend
index b66458cd190..8951e0b3d4c 100644
--- a/ext/nkf/depend
+++ b/ext/nkf/depend
@@ -10,7 +10,6 @@ nkf.o: $(hdrdir)/ruby/backward.h
nkf.o: $(hdrdir)/ruby/backward/2/assume.h
nkf.o: $(hdrdir)/ruby/backward/2/attributes.h
nkf.o: $(hdrdir)/ruby/backward/2/bool.h
-nkf.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
nkf.o: $(hdrdir)/ruby/backward/2/inttypes.h
nkf.o: $(hdrdir)/ruby/backward/2/limits.h
nkf.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/nkf/nkf.c b/ext/nkf/nkf.c
index 76f7648d1bb..533f9b782fd 100644
--- a/ext/nkf/nkf.c
+++ b/ext/nkf/nkf.c
@@ -358,7 +358,7 @@ rb_nkf_guess(VALUE obj, VALUE src)
*
* [-MB] MIME encode Base64 stream.
*
- * [-MQ] Perfome quoted encoding.
+ * [-MQ] Perform quoted encoding.
*
* === -l
*
diff --git a/ext/objspace/depend b/ext/objspace/depend
index 364d6faba6e..bea8ba2315d 100644
--- a/ext/objspace/depend
+++ b/ext/objspace/depend
@@ -1,18 +1,14 @@
# AUTOGENERATED DEPENDENCIES START
object_tracing.o: $(RUBY_EXTCONF_H)
object_tracing.o: $(arch_hdrdir)/ruby/config.h
-object_tracing.o: $(hdrdir)/ruby.h
object_tracing.o: $(hdrdir)/ruby/assert.h
object_tracing.o: $(hdrdir)/ruby/backward.h
object_tracing.o: $(hdrdir)/ruby/backward/2/assume.h
object_tracing.o: $(hdrdir)/ruby/backward/2/attributes.h
object_tracing.o: $(hdrdir)/ruby/backward/2/bool.h
-object_tracing.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
object_tracing.o: $(hdrdir)/ruby/backward/2/inttypes.h
object_tracing.o: $(hdrdir)/ruby/backward/2/limits.h
object_tracing.o: $(hdrdir)/ruby/backward/2/long_long.h
-object_tracing.o: $(hdrdir)/ruby/backward/2/r_cast.h
-object_tracing.o: $(hdrdir)/ruby/backward/2/rmodule.h
object_tracing.o: $(hdrdir)/ruby/backward/2/stdalign.h
object_tracing.o: $(hdrdir)/ruby/backward/2/stdarg.h
object_tracing.o: $(hdrdir)/ruby/debug.h
@@ -166,7 +162,6 @@ object_tracing.o: object_tracing.c
object_tracing.o: objspace.h
objspace.o: $(RUBY_EXTCONF_H)
objspace.o: $(arch_hdrdir)/ruby/config.h
-objspace.o: $(hdrdir)/ruby.h
objspace.o: $(hdrdir)/ruby/assert.h
objspace.o: $(hdrdir)/ruby/backward.h
objspace.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -176,8 +171,6 @@ objspace.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
objspace.o: $(hdrdir)/ruby/backward/2/inttypes.h
objspace.o: $(hdrdir)/ruby/backward/2/limits.h
objspace.o: $(hdrdir)/ruby/backward/2/long_long.h
-objspace.o: $(hdrdir)/ruby/backward/2/r_cast.h
-objspace.o: $(hdrdir)/ruby/backward/2/rmodule.h
objspace.o: $(hdrdir)/ruby/backward/2/stdalign.h
objspace.o: $(hdrdir)/ruby/backward/2/stdarg.h
objspace.o: $(hdrdir)/ruby/defines.h
@@ -360,7 +353,6 @@ objspace.o: objspace.c
objspace.o: {$(VPATH)}id.h
objspace_dump.o: $(RUBY_EXTCONF_H)
objspace_dump.o: $(arch_hdrdir)/ruby/config.h
-objspace_dump.o: $(hdrdir)/ruby.h
objspace_dump.o: $(hdrdir)/ruby/assert.h
objspace_dump.o: $(hdrdir)/ruby/atomic.h
objspace_dump.o: $(hdrdir)/ruby/backward.h
@@ -371,8 +363,6 @@ objspace_dump.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
objspace_dump.o: $(hdrdir)/ruby/backward/2/inttypes.h
objspace_dump.o: $(hdrdir)/ruby/backward/2/limits.h
objspace_dump.o: $(hdrdir)/ruby/backward/2/long_long.h
-objspace_dump.o: $(hdrdir)/ruby/backward/2/r_cast.h
-objspace_dump.o: $(hdrdir)/ruby/backward/2/rmodule.h
objspace_dump.o: $(hdrdir)/ruby/backward/2/stdalign.h
objspace_dump.o: $(hdrdir)/ruby/backward/2/stdarg.h
objspace_dump.o: $(hdrdir)/ruby/debug.h
diff --git a/ext/objspace/object_tracing.c b/ext/objspace/object_tracing.c
index 4973a7535ba..66d6baa4911 100644
--- a/ext/objspace/object_tracing.c
+++ b/ext/objspace/object_tracing.c
@@ -208,7 +208,8 @@ allocation_info_tracer_compact(void *ptr)
{
struct traceobj_arg *trace_arg = (struct traceobj_arg *)ptr;
- if (st_foreach_with_replace(trace_arg->object_table, hash_foreach_should_replace_key, hash_replace_key, 0)) {
+ if (trace_arg->object_table &&
+ st_foreach_with_replace(trace_arg->object_table, hash_foreach_should_replace_key, hash_replace_key, 0)) {
rb_raise(rb_eRuntimeError, "hash modified during iteration");
}
}
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c
index 3fa4fd279b1..ad5bbe7d0c8 100644
--- a/ext/objspace/objspace.c
+++ b/ext/objspace/objspace.c
@@ -423,7 +423,6 @@ count_nodes(int argc, VALUE *argv, VALUE os)
COUNT_NODE(NODE_MASGN);
COUNT_NODE(NODE_LASGN);
COUNT_NODE(NODE_DASGN);
- COUNT_NODE(NODE_DASGN_CURR);
COUNT_NODE(NODE_GASGN);
COUNT_NODE(NODE_IASGN);
COUNT_NODE(NODE_CDECL);
diff --git a/ext/openssl/History.md b/ext/openssl/History.md
index 46435f9be61..479ec3b4a25 100644
--- a/ext/openssl/History.md
+++ b/ext/openssl/History.md
@@ -1,3 +1,105 @@
+Version 3.0.0
+=============
+
+Compatibility notes
+-------------------
+
+* OpenSSL 1.0.1 and Ruby 2.3-2.5 are no longer supported.
+ [[GitHub #396]](https://github.com/ruby/openssl/pull/396)
+ [[GitHub #466]](https://github.com/ruby/openssl/pull/466)
+
+* OpenSSL 3.0 support is added. It is the first major version bump from OpenSSL
+ 1.1 and contains incompatible changes that affect Ruby/OpenSSL.
+ Note that OpenSSL 3.0 support is preliminary and not all features are
+ currently available:
+ [[GitHub #369]](https://github.com/ruby/openssl/issues/369)
+
+ - Deprecate the ability to modify `OpenSSL::PKey::PKey` instances. OpenSSL 3.0
+ made EVP_PKEY structure immutable, and hence the following methods are not
+ available when Ruby/OpenSSL is linked against OpenSSL 3.0.
+ [[GitHub #480]](https://github.com/ruby/openssl/pull/480)
+
+ - `OpenSSL::PKey::RSA#set_key`, `#set_factors`, `#set_crt_params`
+ - `OpenSSL::PKey::DSA#set_pqg`, `#set_key`
+ - `OpenSSL::PKey::DH#set_pqg`, `#set_key`, `#generate_key!`
+ - `OpenSSL::PKey::EC#private_key=`, `#public_key=`, `#group=`, `#generate_key!`
+
+ - Deprecate `OpenSSL::Engine`. The ENGINE API has been deprecated in OpenSSL 3.0
+ in favor of the new "provider" concept and will be removed in a future
+ version.
+ [[GitHub #481]](https://github.com/ruby/openssl/pull/481)
+
+* `OpenSSL::SSL::SSLContext#tmp_ecdh_callback` has been removed. It has been
+ deprecated since v2.0.0 because it is incompatible with modern OpenSSL
+ versions.
+ [[GitHub #394]](https://github.com/ruby/openssl/pull/394)
+
+* `OpenSSL::SSL::SSLSocket#read` and `#write` now raise `OpenSSL::SSL::SSLError`
+ if called before a TLS connection is established. Historically, they
+ read/wrote unencrypted data to the underlying socket directly in that case.
+ [[GitHub #9]](https://github.com/ruby/openssl/issues/9)
+ [[GitHub #469]](https://github.com/ruby/openssl/pull/469)
+
+
+Notable changes
+---------------
+
+* Enhance OpenSSL::PKey's common interface.
+ [[GitHub #370]](https://github.com/ruby/openssl/issues/370)
+
+ - Key deserialization: Enhance `OpenSSL::PKey.read` to handle PEM encoding of
+ DH parameters, which used to be only deserialized by `OpenSSL::PKey::DH.new`.
+ [[GitHub #328]](https://github.com/ruby/openssl/issues/328)
+ - Key generation: Add `OpenSSL::PKey.generate_parameters` and
+ `OpenSSL::PKey.generate_key`.
+ [[GitHub #329]](https://github.com/ruby/openssl/issues/329)
+ - Public key signing: Enhance `OpenSSL::PKey::PKey#sign` and `#verify` to use
+ the new EVP_DigestSign() family to enable PureEdDSA support on OpenSSL 1.1.1
+ or later. They also now take optional algorithm-specific parameters for more
+ control.
+ [[GitHub #329]](https://github.com/ruby/openssl/issues/329)
+ - Low-level public key signing and verification: Add
+ `OpenSSL::PKey::PKey#sign_raw`, `#verify_raw`, and `#verify_recover`.
+ [[GitHub #382]](https://github.com/ruby/openssl/issues/382)
+ - Public key encryption: Add `OpenSSL::PKey::PKey#encrypt` and `#decrypt`.
+ [[GitHub #382]](https://github.com/ruby/openssl/issues/382)
+ - Key agreement: Add `OpenSSL::PKey::PKey#derive`.
+ [[GitHub #329]](https://github.com/ruby/openssl/issues/329)
+ - Key comparison: Add `OpenSSL::PKey::PKey#compare?` to conveniently check
+ that two keys have common parameters and a public key.
+ [[GitHub #383]](https://github.com/ruby/openssl/issues/383)
+
+* Add `OpenSSL::BN#set_flags` and `#get_flags`. This can be used in combination
+ with `OpenSSL::BN::CONSTTIME` to force constant-time computation.
+ [[GitHub #417]](https://github.com/ruby/openssl/issues/417)
+
+* Add `OpenSSL::BN#abs` to get the absolute value of the BIGNUM.
+ [[GitHub #430]](https://github.com/ruby/openssl/issues/430)
+
+* Add `OpenSSL::SSL::SSLSocket#getbyte`.
+ [[GitHub #438]](https://github.com/ruby/openssl/issues/438)
+
+* Add `OpenSSL::SSL::SSLContext#tmp_dh=`.
+ [[GitHub #459]](https://github.com/ruby/openssl/pull/459)
+
+* Add `OpenSSL::X509::Certificate.load` to load a PEM-encoded and concatenated
+ list of X.509 certificates at once.
+ [[GitHub #441]](https://github.com/ruby/openssl/pull/441)
+
+* Change `OpenSSL::X509::Certificate.new` to attempt to deserialize the given
+ string first as DER encoding first and then as PEM encoding to ensure the
+ round-trip consistency.
+ [[GitHub #442]](https://github.com/ruby/openssl/pull/442)
+
+* Update various part of the code base to use the modern API. No breaking
+ changes are intended with this. This includes:
+
+ - `OpenSSL::HMAC` uses the EVP API.
+ [[GitHub #371]](https://github.com/ruby/openssl/issues/371)
+ - `OpenSSL::Config` uses native OpenSSL API to parse config files.
+ [[GitHub #342]](https://github.com/ruby/openssl/issues/342)
+
+
Version 2.2.1
=============
@@ -113,7 +215,7 @@ Bug fixes
[[GitHub #453]](https://github.com/ruby/openssl/pull/453)
* Fix misuse of input record separator in `OpenSSL::Buffering` where it was
for output.
-* Fix wrong interger casting in `OpenSSL::PKey::EC#dsa_verify_asn1`.
+* Fix wrong integer casting in `OpenSSL::PKey::EC#dsa_verify_asn1`.
[[GitHub #460]](https://github.com/ruby/openssl/pull/460)
* `extconf.rb` explicitly checks that OpenSSL's version number is 1.0.1 or
newer but also less than 3.0. Ruby/OpenSSL v2.1.x and v2.2.x will not support
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb
index 1d38b569904..fedcb930f5a 100644
--- a/ext/openssl/extconf.rb
+++ b/ext/openssl/extconf.rb
@@ -179,6 +179,7 @@ have_func("BN_check_prime")
have_func("EVP_MD_CTX_get0_md")
have_func("EVP_MD_CTX_get_pkey_ctx")
have_func("EVP_PKEY_eq")
+have_func("EVP_PKEY_dup")
Logging::message "=== Checking done. ===\n"
diff --git a/ext/openssl/lib/openssl/pkey.rb b/ext/openssl/lib/openssl/pkey.rb
index f6bf5892b09..c3e06290910 100644
--- a/ext/openssl/lib/openssl/pkey.rb
+++ b/ext/openssl/lib/openssl/pkey.rb
@@ -47,9 +47,19 @@ module OpenSSL::PKey
# * _pub_bn_ is a OpenSSL::BN, *not* the DH instance returned by
# DH#public_key as that contains the DH parameters only.
def compute_key(pub_bn)
- peer = dup
- peer.set_key(pub_bn, nil)
- derive(peer)
+ # FIXME: This is constructing an X.509 SubjectPublicKeyInfo and is very
+ # inefficient
+ obj = OpenSSL::ASN1.Sequence([
+ OpenSSL::ASN1.Sequence([
+ OpenSSL::ASN1.ObjectId("dhKeyAgreement"),
+ OpenSSL::ASN1.Sequence([
+ OpenSSL::ASN1.Integer(p),
+ OpenSSL::ASN1.Integer(g),
+ ]),
+ ]),
+ OpenSSL::ASN1.BitString(OpenSSL::ASN1.Integer(pub_bn).to_der),
+ ])
+ derive(OpenSSL::PKey.read(obj.to_der))
end
# :call-seq:
@@ -61,14 +71,29 @@ module OpenSSL::PKey
# called first in order to generate the per-session keys before performing
# the actual key exchange.
#
+ # <b>Deprecated in version 3.0</b>. This method is incompatible with
+ # OpenSSL 3.0.0 or later.
+ #
# See also OpenSSL::PKey.generate_key.
#
# Example:
- # dh = OpenSSL::PKey::DH.new(2048)
- # public_key = dh.public_key #contains no private/public key yet
- # public_key.generate_key!
- # puts public_key.private? # => true
+ # # DEPRECATED USAGE: This will not work on OpenSSL 3.0 or later
+ # dh0 = OpenSSL::PKey::DH.new(2048)
+ # dh = dh0.public_key # #public_key only copies the DH parameters (contrary to the name)
+ # dh.generate_key!
+ # puts dh.private? # => true
+ # puts dh0.pub_key == dh.pub_key #=> false
+ #
+ # # With OpenSSL::PKey.generate_key
+ # dh0 = OpenSSL::PKey::DH.new(2048)
+ # dh = OpenSSL::PKey.generate_key(dh0)
+ # puts dh0.pub_key == dh.pub_key #=> false
def generate_key!
+ if OpenSSL::OPENSSL_VERSION_NUMBER >= 0x30000000
+ raise DHError, "OpenSSL::PKey::DH is immutable on OpenSSL 3.0; " \
+ "use OpenSSL::PKey.generate_key instead"
+ end
+
unless priv_key
tmp = OpenSSL::PKey.generate_key(self)
set_key(tmp.pub_key, tmp.priv_key)
@@ -249,9 +274,14 @@ module OpenSSL::PKey
# This method is provided for backwards compatibility, and calls #derive
# internally.
def dh_compute_key(pubkey)
- peer = OpenSSL::PKey::EC.new(group)
- peer.public_key = pubkey
- derive(peer)
+ obj = OpenSSL::ASN1.Sequence([
+ OpenSSL::ASN1.Sequence([
+ OpenSSL::ASN1.ObjectId("id-ecPublicKey"),
+ group.to_der,
+ ]),
+ OpenSSL::ASN1.BitString(pubkey.to_octet_string(:uncompressed)),
+ ])
+ derive(OpenSSL::PKey.read(obj.to_der))
end
end
diff --git a/ext/openssl/lib/openssl/version.rb b/ext/openssl/lib/openssl/version.rb
index acd53d440d4..5e60604353e 100644
--- a/ext/openssl/lib/openssl/version.rb
+++ b/ext/openssl/lib/openssl/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
module OpenSSL
- VERSION = "3.0.0.pre"
+ VERSION = "3.0.0"
end
diff --git a/ext/openssl/lib/openssl/x509.rb b/ext/openssl/lib/openssl/x509.rb
index 448941f75e3..f973f4f4dc6 100644
--- a/ext/openssl/lib/openssl/x509.rb
+++ b/ext/openssl/lib/openssl/x509.rb
@@ -279,11 +279,29 @@ module OpenSSL
end
class << self
+ # Parses the UTF-8 string representation of a distinguished name,
+ # according to RFC 2253.
+ #
+ # See also #to_utf8 for the opposite operation.
def parse_rfc2253(str, template=OBJECT_TYPE_TEMPLATE)
ary = OpenSSL::X509::Name::RFC2253DN.scan(str)
self.new(ary, template)
end
+ # Parses the string representation of a distinguished name. Two
+ # different forms are supported:
+ #
+ # - \OpenSSL format (<tt>X509_NAME_oneline()</tt>) used by
+ # <tt>#to_s</tt>. For example: <tt>/DC=com/DC=example/CN=nobody</tt>
+ # - \OpenSSL format (<tt>X509_NAME_print()</tt>)
+ # used by <tt>#to_s(OpenSSL::X509::Name::COMPAT)</tt>. For example:
+ # <tt>DC=com, DC=example, CN=nobody</tt>
+ #
+ # Neither of them is standardized and has quirks and inconsistencies
+ # in handling of escaped characters or multi-valued RDNs.
+ #
+ # Use of this method is discouraged in new applications. See
+ # Name.parse_rfc2253 and #to_utf8 for the alternative.
def parse_openssl(str, template=OBJECT_TYPE_TEMPLATE)
if str.start_with?("/")
# /A=B/C=D format
diff --git a/ext/openssl/openssl.gemspec b/ext/openssl/openssl.gemspec
index 38bcb9db5f5..c6cd8183369 100644
--- a/ext/openssl/openssl.gemspec
+++ b/ext/openssl/openssl.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |spec|
spec.name = "openssl"
- spec.version = "3.0.0.pre"
+ spec.version = "3.0.0"
spec.authors = ["Martin Bosslet", "SHIBATA Hiroshi", "Zachary Scott", "Kazuki Yamaguchi"]
spec.email = ["ruby-core@ruby-lang.org"]
spec.summary = %q{OpenSSL provides SSL, TLS and general purpose cryptography.}
diff --git a/ext/openssl/openssl_missing.c b/ext/openssl/openssl_missing.c
index 8b93cba6d42..4415703db4d 100644
--- a/ext/openssl/openssl_missing.c
+++ b/ext/openssl/openssl_missing.c
@@ -10,9 +10,6 @@
#include RUBY_EXTCONF_H
#include <string.h> /* memcpy() */
-#if !defined(OPENSSL_NO_ENGINE)
-# include <openssl/engine.h>
-#endif
#include <openssl/x509_vfy.h>
#include "openssl_missing.h"
diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h
index 3a0ab1e5935..4b5126893bc 100644
--- a/ext/openssl/ossl.h
+++ b/ext/openssl/ossl.h
@@ -18,6 +18,7 @@
#include <ruby/io.h>
#include <ruby/thread.h>
#include <openssl/opensslv.h>
+
#include <openssl/err.h>
#include <openssl/asn1.h>
#include <openssl/x509v3.h>
@@ -30,9 +31,6 @@
#include <openssl/ts.h>
#endif
#include <openssl/crypto.h>
-#if !defined(OPENSSL_NO_ENGINE)
-# include <openssl/engine.h>
-#endif
#if !defined(OPENSSL_NO_OCSP)
# include <openssl/ocsp.h>
#endif
@@ -54,6 +52,10 @@
(LIBRESSL_VERSION_NUMBER >= (maj << 28) | (min << 20) | (pat << 12))
#endif
+#if !defined(OPENSSL_NO_ENGINE) && !OSSL_OPENSSL_PREREQ(3, 0, 0)
+# define OSSL_USE_ENGINE
+#endif
+
/*
* Common Module
*/
diff --git a/ext/openssl/ossl_engine.c b/ext/openssl/ossl_engine.c
index 661a1368e25..1abde7f7669 100644
--- a/ext/openssl/ossl_engine.c
+++ b/ext/openssl/ossl_engine.c
@@ -9,7 +9,8 @@
*/
#include "ossl.h"
-#if !defined(OPENSSL_NO_ENGINE)
+#ifdef OSSL_USE_ENGINE
+# include <openssl/engine.h>
#define NewEngine(klass) \
TypedData_Wrap_Struct((klass), &ossl_engine_type, 0)
diff --git a/ext/openssl/ossl_hmac.c b/ext/openssl/ossl_hmac.c
index f89ff2f9a16..bfe3a74b126 100644
--- a/ext/openssl/ossl_hmac.c
+++ b/ext/openssl/ossl_hmac.c
@@ -175,7 +175,7 @@ static VALUE
ossl_hmac_digest(VALUE self)
{
EVP_MD_CTX *ctx;
- size_t buf_len;
+ size_t buf_len = EVP_MAX_MD_SIZE;
VALUE ret;
GetHMAC(self, ctx);
@@ -200,7 +200,7 @@ ossl_hmac_hexdigest(VALUE self)
{
EVP_MD_CTX *ctx;
unsigned char buf[EVP_MAX_MD_SIZE];
- size_t buf_len;
+ size_t buf_len = EVP_MAX_MD_SIZE;
VALUE ret;
GetHMAC(self, ctx);
diff --git a/ext/openssl/ossl_ocsp.c b/ext/openssl/ossl_ocsp.c
index d4ca958a586..1e87484afc8 100644
--- a/ext/openssl/ossl_ocsp.c
+++ b/ext/openssl/ossl_ocsp.c
@@ -803,7 +803,7 @@ add_status_convert_time(VALUE obj)
* revocation, and must be one of OpenSSL::OCSP::REVOKED_STATUS_* constants.
* _revocation_time_ is the time when the certificate is revoked.
*
- * _this_update_ and _next_update_ indicate the time at which ths status is
+ * _this_update_ and _next_update_ indicate the time at which the status is
* verified to be correct and the time at or before which newer information
* will be available, respectively. _next_update_ is optional.
*
diff --git a/ext/openssl/ossl_pkey.c b/ext/openssl/ossl_pkey.c
index f9f5162e414..2a4835a28d0 100644
--- a/ext/openssl/ossl_pkey.c
+++ b/ext/openssl/ossl_pkey.c
@@ -9,6 +9,10 @@
*/
#include "ossl.h"
+#ifdef OSSL_USE_ENGINE
+# include <openssl/engine.h>
+#endif
+
/*
* Classes
*/
@@ -39,12 +43,8 @@ pkey_new0(VALUE arg)
{
EVP_PKEY *pkey = (EVP_PKEY *)arg;
VALUE klass, obj;
- int type;
-
- if (!pkey || (type = EVP_PKEY_base_id(pkey)) == EVP_PKEY_NONE)
- ossl_raise(rb_eRuntimeError, "pkey is empty");
- switch (type) {
+ switch (EVP_PKEY_base_id(pkey)) {
#if !defined(OPENSSL_NO_RSA)
case EVP_PKEY_RSA: klass = cRSA; break;
#endif
@@ -59,8 +59,8 @@ pkey_new0(VALUE arg)
#endif
default: klass = cPKey; break;
}
- obj = NewPKey(klass);
- SetPKey(obj, pkey);
+ obj = rb_obj_alloc(klass);
+ RTYPEDDATA_DATA(obj) = pkey;
return obj;
}
@@ -79,6 +79,45 @@ ossl_pkey_new(EVP_PKEY *pkey)
return obj;
}
+#if OSSL_OPENSSL_PREREQ(3, 0, 0)
+# include <openssl/decoder.h>
+
+EVP_PKEY *
+ossl_pkey_read_generic(BIO *bio, VALUE pass)
+{
+ void *ppass = (void *)pass;
+ OSSL_DECODER_CTX *dctx;
+ EVP_PKEY *pkey = NULL;
+ int pos = 0, pos2;
+
+ dctx = OSSL_DECODER_CTX_new_for_pkey(&pkey, "DER", NULL, NULL, 0, NULL, NULL);
+ if (!dctx)
+ goto out;
+ if (OSSL_DECODER_CTX_set_pem_password_cb(dctx, ossl_pem_passwd_cb, ppass) != 1)
+ goto out;
+
+ /* First check DER */
+ if (OSSL_DECODER_from_bio(dctx, bio) == 1)
+ goto out;
+
+ /* Then check PEM; multiple OSSL_DECODER_from_bio() calls may be needed */
+ OSSL_BIO_reset(bio);
+ if (OSSL_DECODER_CTX_set_input_type(dctx, "PEM") != 1)
+ goto out;
+ while (OSSL_DECODER_from_bio(dctx, bio) != 1) {
+ if (BIO_eof(bio))
+ goto out;
+ pos2 = BIO_tell(bio);
+ if (pos2 < 0 || pos2 <= pos)
+ goto out;
+ pos = pos2;
+ }
+
+ out:
+ OSSL_DECODER_CTX_free(dctx);
+ return pkey;
+}
+#else
EVP_PKEY *
ossl_pkey_read_generic(BIO *bio, VALUE pass)
{
@@ -107,6 +146,7 @@ ossl_pkey_read_generic(BIO *bio, VALUE pass)
out:
return pkey;
}
+#endif
/*
* call-seq:
@@ -276,6 +316,11 @@ pkey_generate(int argc, VALUE *argv, VALUE self, int genparam)
ossl_raise(ePKeyError, "EVP_PKEY_CTX_new");
}
else {
+#if OSSL_OPENSSL_PREREQ(3, 0, 0)
+ ctx = EVP_PKEY_CTX_new_from_name(NULL, StringValueCStr(alg), NULL);
+ if (!ctx)
+ ossl_raise(ePKeyError, "EVP_PKEY_CTX_new_from_name");
+#else
const EVP_PKEY_ASN1_METHOD *ameth;
ENGINE *tmpeng;
int pkey_id;
@@ -294,6 +339,7 @@ pkey_generate(int argc, VALUE *argv, VALUE self, int genparam)
ctx = EVP_PKEY_CTX_new_id(pkey_id, NULL/* engine */);
if (!ctx)
ossl_raise(ePKeyError, "EVP_PKEY_CTX_new_id");
+#endif
}
if (genparam && EVP_PKEY_paramgen_init(ctx) <= 0) {
@@ -389,9 +435,19 @@ ossl_pkey_s_generate_key(int argc, VALUE *argv, VALUE self)
return pkey_generate(argc, argv, self, 0);
}
+/*
+ * TODO: There is no convenient way to check the presence of public key
+ * components on OpenSSL 3.0. But since keys are immutable on 3.0, pkeys without
+ * these should only be created by OpenSSL::PKey.generate_parameters or by
+ * parsing DER-/PEM-encoded string. We would need another flag for that.
+ */
void
ossl_pkey_check_public_key(const EVP_PKEY *pkey)
{
+#if OSSL_OPENSSL_PREREQ(3, 0, 0)
+ if (EVP_PKEY_missing_parameters(pkey))
+ ossl_raise(ePKeyError, "parameters missing");
+#else
void *ptr;
const BIGNUM *n, *e, *pubkey;
@@ -427,6 +483,7 @@ ossl_pkey_check_public_key(const EVP_PKEY *pkey)
return;
}
ossl_raise(ePKeyError, "public key missing");
+#endif
}
EVP_PKEY *
@@ -476,16 +533,7 @@ DupPKeyPtr(VALUE obj)
static VALUE
ossl_pkey_alloc(VALUE klass)
{
- EVP_PKEY *pkey;
- VALUE obj;
-
- obj = NewPKey(klass);
- if (!(pkey = EVP_PKEY_new())) {
- ossl_raise(ePKeyError, NULL);
- }
- SetPKey(obj, pkey);
-
- return obj;
+ return TypedData_Wrap_Struct(klass, &ossl_evp_pkey_type, NULL);
}
/*
@@ -504,6 +552,26 @@ ossl_pkey_initialize(VALUE self)
return self;
}
+#ifdef HAVE_EVP_PKEY_DUP
+static VALUE
+ossl_pkey_initialize_copy(VALUE self, VALUE other)
+{
+ EVP_PKEY *pkey, *pkey_other;
+
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ TypedData_Get_Struct(other, EVP_PKEY, &ossl_evp_pkey_type, pkey_other);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
+ if (pkey_other) {
+ pkey = EVP_PKEY_dup(pkey_other);
+ if (!pkey)
+ ossl_raise(ePKeyError, "EVP_PKEY_dup");
+ RTYPEDDATA_DATA(self) = pkey;
+ }
+ return self;
+}
+#endif
+
/*
* call-seq:
* pkey.oid -> string
@@ -1481,6 +1549,11 @@ Init_ossl_pkey(void)
rb_define_alloc_func(cPKey, ossl_pkey_alloc);
rb_define_method(cPKey, "initialize", ossl_pkey_initialize, 0);
+#ifdef HAVE_EVP_PKEY_DUP
+ rb_define_method(cPKey, "initialize_copy", ossl_pkey_initialize_copy, 1);
+#else
+ rb_undef_method(cPKey, "initialize_copy");
+#endif
rb_define_method(cPKey, "oid", ossl_pkey_oid, 0);
rb_define_method(cPKey, "inspect", ossl_pkey_inspect, 0);
rb_define_method(cPKey, "to_text", ossl_pkey_to_text, 0);
diff --git a/ext/openssl/ossl_pkey.h b/ext/openssl/ossl_pkey.h
index 4beede22b55..38fb9fad108 100644
--- a/ext/openssl/ossl_pkey.h
+++ b/ext/openssl/ossl_pkey.h
@@ -15,19 +15,10 @@ extern VALUE cPKey;
extern VALUE ePKeyError;
extern const rb_data_type_t ossl_evp_pkey_type;
-#define OSSL_PKEY_SET_PRIVATE(obj) rb_iv_set((obj), "private", Qtrue)
-#define OSSL_PKEY_SET_PUBLIC(obj) rb_iv_set((obj), "private", Qfalse)
-#define OSSL_PKEY_IS_PRIVATE(obj) (rb_iv_get((obj), "private") == Qtrue)
+/* For ENGINE */
+#define OSSL_PKEY_SET_PRIVATE(obj) rb_ivar_set((obj), rb_intern("private"), Qtrue)
+#define OSSL_PKEY_IS_PRIVATE(obj) (rb_attr_get((obj), rb_intern("private")) == Qtrue)
-#define NewPKey(klass) \
- TypedData_Wrap_Struct((klass), &ossl_evp_pkey_type, 0)
-#define SetPKey(obj, pkey) do { \
- if (!(pkey)) { \
- rb_raise(rb_eRuntimeError, "PKEY wasn't initialized!"); \
- } \
- RTYPEDDATA_DATA(obj) = (pkey); \
- OSSL_PKEY_SET_PUBLIC(obj); \
-} while (0)
#define GetPKey(obj, pkey) do {\
TypedData_Get_Struct((obj), EVP_PKEY, &ossl_evp_pkey_type, (pkey)); \
if (!(pkey)) { \
@@ -35,6 +26,7 @@ extern const rb_data_type_t ossl_evp_pkey_type;
} \
} while (0)
+/* Takes ownership of the EVP_PKEY */
VALUE ossl_pkey_new(EVP_PKEY *);
void ossl_pkey_check_public_key(const EVP_PKEY *);
EVP_PKEY *ossl_pkey_read_generic(BIO *, VALUE);
@@ -124,6 +116,7 @@ static VALUE ossl_##_keytype##_get_##_name(VALUE self) \
OSSL_PKEY_BN_DEF_GETTER0(_keytype, _type, a2, \
_type##_get0_##_group(obj, NULL, &bn))
+#if !OSSL_OPENSSL_PREREQ(3, 0, 0)
#define OSSL_PKEY_BN_DEF_SETTER3(_keytype, _type, _group, a1, a2, a3) \
/* \
* call-seq: \
@@ -181,6 +174,21 @@ static VALUE ossl_##_keytype##_set_##_group(VALUE self, VALUE v1, VALUE v2) \
} \
return self; \
}
+#else
+#define OSSL_PKEY_BN_DEF_SETTER3(_keytype, _type, _group, a1, a2, a3) \
+static VALUE ossl_##_keytype##_set_##_group(VALUE self, VALUE v1, VALUE v2, VALUE v3) \
+{ \
+ rb_raise(ePKeyError, \
+ #_keytype"#set_"#_group"= is incompatible with OpenSSL 3.0"); \
+}
+
+#define OSSL_PKEY_BN_DEF_SETTER2(_keytype, _type, _group, a1, a2) \
+static VALUE ossl_##_keytype##_set_##_group(VALUE self, VALUE v1, VALUE v2) \
+{ \
+ rb_raise(ePKeyError, \
+ #_keytype"#set_"#_group"= is incompatible with OpenSSL 3.0"); \
+}
+#endif
#define OSSL_PKEY_BN_DEF3(_keytype, _type, _group, a1, a2, a3) \
OSSL_PKEY_BN_DEF_GETTER3(_keytype, _type, _group, a1, a2, a3) \
diff --git a/ext/openssl/ossl_pkey_dh.c b/ext/openssl/ossl_pkey_dh.c
index ca782bbe59f..696455dcfd3 100644
--- a/ext/openssl/ossl_pkey_dh.c
+++ b/ext/openssl/ossl_pkey_dh.c
@@ -58,51 +58,76 @@ VALUE eDHError;
*
* Examples:
* # Creating an instance from scratch
- * dh = DH.new
+ * # Note that this is deprecated and will not work on OpenSSL 3.0 or later.
+ * dh = OpenSSL::PKey::DH.new
* dh.set_pqg(bn_p, nil, bn_g)
*
* # Generating a parameters and a key pair
- * dh = DH.new(2048) # An alias of DH.generate(2048)
+ * dh = OpenSSL::PKey::DH.new(2048) # An alias of OpenSSL::PKey::DH.generate(2048)
*
* # Reading DH parameters
- * dh = DH.new(File.read('parameters.pem')) # -> dh, but no public/private key yet
- * dh.generate_key! # -> dh with public and private key
+ * dh_params = OpenSSL::PKey::DH.new(File.read('parameters.pem')) # loads parameters only
+ * dh = OpenSSL::PKey.generate_key(dh_params) # generates a key pair
*/
static VALUE
ossl_dh_initialize(int argc, VALUE *argv, VALUE self)
{
EVP_PKEY *pkey;
+ int type;
DH *dh;
- BIO *in;
+ BIO *in = NULL;
VALUE arg;
- GetPKey(self, pkey);
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
+
/* The DH.new(size, generator) form is handled by lib/openssl/pkey.rb */
if (rb_scan_args(argc, argv, "01", &arg) == 0) {
dh = DH_new();
if (!dh)
ossl_raise(eDHError, "DH_new");
+ goto legacy;
}
- else {
- arg = ossl_to_der_if_possible(arg);
- in = ossl_obj2bio(&arg);
- dh = PEM_read_bio_DHparams(in, NULL, NULL, NULL);
- if (!dh){
- OSSL_BIO_reset(in);
- dh = d2i_DHparams_bio(in, NULL);
- }
- BIO_free(in);
- if (!dh) {
- ossl_raise(eDHError, NULL);
- }
+
+ arg = ossl_to_der_if_possible(arg);
+ in = ossl_obj2bio(&arg);
+
+ /*
+ * On OpenSSL <= 1.1.1 and current versions of LibreSSL, the generic
+ * routine does not support DER-encoded parameters
+ */
+ dh = d2i_DHparams_bio(in, NULL);
+ if (dh)
+ goto legacy;
+ OSSL_BIO_reset(in);
+
+ pkey = ossl_pkey_read_generic(in, Qnil);
+ BIO_free(in);
+ if (!pkey)
+ ossl_raise(eDHError, "could not parse pkey");
+
+ type = EVP_PKEY_base_id(pkey);
+ if (type != EVP_PKEY_DH) {
+ EVP_PKEY_free(pkey);
+ rb_raise(eDHError, "incorrect pkey type: %s", OBJ_nid2sn(type));
}
- if (!EVP_PKEY_assign_DH(pkey, dh)) {
- DH_free(dh);
- ossl_raise(eDHError, NULL);
+ RTYPEDDATA_DATA(self) = pkey;
+ return self;
+
+ legacy:
+ BIO_free(in);
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_DH(pkey, dh) != 1) {
+ EVP_PKEY_free(pkey);
+ DH_free(dh);
+ ossl_raise(eDHError, "EVP_PKEY_assign_DH");
}
+ RTYPEDDATA_DATA(self) = pkey;
return self;
}
+#ifndef HAVE_EVP_PKEY_DUP
static VALUE
ossl_dh_initialize_copy(VALUE self, VALUE other)
{
@@ -110,15 +135,14 @@ ossl_dh_initialize_copy(VALUE self, VALUE other)
DH *dh, *dh_other;
const BIGNUM *pub, *priv;
- GetPKey(self, pkey);
- if (EVP_PKEY_base_id(pkey) != EVP_PKEY_NONE)
- ossl_raise(eDHError, "DH already initialized");
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
GetDH(other, dh_other);
dh = DHparams_dup(dh_other);
if (!dh)
ossl_raise(eDHError, "DHparams_dup");
- EVP_PKEY_assign_DH(pkey, dh);
DH_get0_key(dh_other, &pub, &priv);
if (pub) {
@@ -133,8 +157,16 @@ ossl_dh_initialize_copy(VALUE self, VALUE other)
DH_set0_key(dh, pub2, priv2);
}
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_DH(pkey, dh) != 1) {
+ EVP_PKEY_free(pkey);
+ DH_free(dh);
+ ossl_raise(eDHError, "EVP_PKEY_assign_DH");
+ }
+ RTYPEDDATA_DATA(self) = pkey;
return self;
}
+#endif
/*
* call-seq:
@@ -378,7 +410,9 @@ Init_ossl_dh(void)
*/
cDH = rb_define_class_under(mPKey, "DH", cPKey);
rb_define_method(cDH, "initialize", ossl_dh_initialize, -1);
+#ifndef HAVE_EVP_PKEY_DUP
rb_define_method(cDH, "initialize_copy", ossl_dh_initialize_copy, 1);
+#endif
rb_define_method(cDH, "public?", ossl_dh_is_public, 0);
rb_define_method(cDH, "private?", ossl_dh_is_private, 0);
rb_define_method(cDH, "export", ossl_dh_export, 0);
diff --git a/ext/openssl/ossl_pkey_dsa.c b/ext/openssl/ossl_pkey_dsa.c
index 7af00eebecf..25404aa7f5e 100644
--- a/ext/openssl/ossl_pkey_dsa.c
+++ b/ext/openssl/ossl_pkey_dsa.c
@@ -83,72 +83,91 @@ VALUE eDSAError;
static VALUE
ossl_dsa_initialize(int argc, VALUE *argv, VALUE self)
{
- EVP_PKEY *pkey, *tmp;
- DSA *dsa = NULL;
- BIO *in;
+ EVP_PKEY *pkey;
+ DSA *dsa;
+ BIO *in = NULL;
VALUE arg, pass;
+ int type;
+
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
- GetPKey(self, pkey);
/* The DSA.new(size, generator) form is handled by lib/openssl/pkey.rb */
rb_scan_args(argc, argv, "02", &arg, &pass);
if (argc == 0) {
dsa = DSA_new();
if (!dsa)
ossl_raise(eDSAError, "DSA_new");
+ goto legacy;
}
- else {
- pass = ossl_pem_passwd_value(pass);
- arg = ossl_to_der_if_possible(arg);
- in = ossl_obj2bio(&arg);
-
- tmp = ossl_pkey_read_generic(in, pass);
- if (tmp) {
- if (EVP_PKEY_base_id(tmp) != EVP_PKEY_DSA)
- rb_raise(eDSAError, "incorrect pkey type: %s",
- OBJ_nid2sn(EVP_PKEY_base_id(tmp)));
- dsa = EVP_PKEY_get1_DSA(tmp);
- EVP_PKEY_free(tmp);
- }
- if (!dsa) {
- OSSL_BIO_reset(in);
-#define PEM_read_bio_DSAPublicKey(bp,x,cb,u) (DSA *)PEM_ASN1_read_bio( \
- (d2i_of_void *)d2i_DSAPublicKey, PEM_STRING_DSA_PUBLIC, (bp), (void **)(x), (cb), (u))
- dsa = PEM_read_bio_DSAPublicKey(in, NULL, NULL, NULL);
-#undef PEM_read_bio_DSAPublicKey
- }
- BIO_free(in);
- if (!dsa) {
- ossl_clear_error();
- ossl_raise(eDSAError, "Neither PUB key nor PRIV key");
- }
- }
- if (!EVP_PKEY_assign_DSA(pkey, dsa)) {
- DSA_free(dsa);
- ossl_raise(eDSAError, NULL);
+
+ pass = ossl_pem_passwd_value(pass);
+ arg = ossl_to_der_if_possible(arg);
+ in = ossl_obj2bio(&arg);
+
+ /* DER-encoded DSAPublicKey format isn't supported by the generic routine */
+ dsa = (DSA *)PEM_ASN1_read_bio((d2i_of_void *)d2i_DSAPublicKey,
+ PEM_STRING_DSA_PUBLIC,
+ in, NULL, NULL, NULL);
+ if (dsa)
+ goto legacy;
+ OSSL_BIO_reset(in);
+
+ pkey = ossl_pkey_read_generic(in, pass);
+ BIO_free(in);
+ if (!pkey)
+ ossl_raise(eDSAError, "Neither PUB key nor PRIV key");
+
+ type = EVP_PKEY_base_id(pkey);
+ if (type != EVP_PKEY_DSA) {
+ EVP_PKEY_free(pkey);
+ rb_raise(eDSAError, "incorrect pkey type: %s", OBJ_nid2sn(type));
}
+ RTYPEDDATA_DATA(self) = pkey;
+ return self;
+ legacy:
+ BIO_free(in);
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_DSA(pkey, dsa) != 1) {
+ EVP_PKEY_free(pkey);
+ DSA_free(dsa);
+ ossl_raise(eDSAError, "EVP_PKEY_assign_DSA");
+ }
+ RTYPEDDATA_DATA(self) = pkey;
return self;
}
+#ifndef HAVE_EVP_PKEY_DUP
static VALUE
ossl_dsa_initialize_copy(VALUE self, VALUE other)
{
EVP_PKEY *pkey;
DSA *dsa, *dsa_new;
- GetPKey(self, pkey);
- if (EVP_PKEY_base_id(pkey) != EVP_PKEY_NONE)
- ossl_raise(eDSAError, "DSA already initialized");
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
GetDSA(other, dsa);
- dsa_new = ASN1_dup((i2d_of_void *)i2d_DSAPrivateKey, (d2i_of_void *)d2i_DSAPrivateKey, (char *)dsa);
+ dsa_new = (DSA *)ASN1_dup((i2d_of_void *)i2d_DSAPrivateKey,
+ (d2i_of_void *)d2i_DSAPrivateKey,
+ (char *)dsa);
if (!dsa_new)
ossl_raise(eDSAError, "ASN1_dup");
- EVP_PKEY_assign_DSA(pkey, dsa_new);
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_DSA(pkey, dsa_new) != 1) {
+ EVP_PKEY_free(pkey);
+ DSA_free(dsa_new);
+ ossl_raise(eDSAError, "EVP_PKEY_assign_DSA");
+ }
+ RTYPEDDATA_DATA(self) = pkey;
return self;
}
+#endif
/*
* call-seq:
@@ -310,7 +329,9 @@ Init_ossl_dsa(void)
cDSA = rb_define_class_under(mPKey, "DSA", cPKey);
rb_define_method(cDSA, "initialize", ossl_dsa_initialize, -1);
+#ifndef HAVE_EVP_PKEY_DUP
rb_define_method(cDSA, "initialize_copy", ossl_dsa_initialize_copy, 1);
+#endif
rb_define_method(cDSA, "public?", ossl_dsa_is_public, 0);
rb_define_method(cDSA, "private?", ossl_dsa_is_private, 0);
diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c
index db80d112a03..dee215447da 100644
--- a/ext/openssl/ossl_pkey_ec.c
+++ b/ext/openssl/ossl_pkey_ec.c
@@ -109,13 +109,16 @@ ossl_ec_key_s_generate(VALUE klass, VALUE arg)
VALUE obj;
obj = rb_obj_alloc(klass);
- GetPKey(obj, pkey);
ec = ec_key_new_from_group(arg);
- if (!EVP_PKEY_assign_EC_KEY(pkey, ec)) {
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_EC_KEY(pkey, ec) != 1) {
+ EVP_PKEY_free(pkey);
EC_KEY_free(ec);
ossl_raise(eECError, "EVP_PKEY_assign_EC_KEY");
}
+ RTYPEDDATA_DATA(obj) = pkey;
+
if (!EC_KEY_generate_key(ec))
ossl_raise(eECError, "EC_KEY_generate_key");
@@ -136,75 +139,83 @@ ossl_ec_key_s_generate(VALUE klass, VALUE arg)
static VALUE ossl_ec_key_initialize(int argc, VALUE *argv, VALUE self)
{
EVP_PKEY *pkey;
- EC_KEY *ec = NULL;
+ EC_KEY *ec;
+ BIO *in;
VALUE arg, pass;
+ int type;
- GetPKey(self, pkey);
- if (EVP_PKEY_base_id(pkey) != EVP_PKEY_NONE)
- ossl_raise(eECError, "EC_KEY already initialized");
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
rb_scan_args(argc, argv, "02", &arg, &pass);
-
if (NIL_P(arg)) {
if (!(ec = EC_KEY_new()))
- ossl_raise(eECError, NULL);
- } else if (rb_obj_is_kind_of(arg, cEC)) {
- EC_KEY *other_ec = NULL;
+ ossl_raise(eECError, "EC_KEY_new");
+ goto legacy;
+ }
+ else if (rb_obj_is_kind_of(arg, cEC_GROUP)) {
+ ec = ec_key_new_from_group(arg);
+ goto legacy;
+ }
- GetEC(arg, other_ec);
- if (!(ec = EC_KEY_dup(other_ec)))
- ossl_raise(eECError, NULL);
- } else if (rb_obj_is_kind_of(arg, cEC_GROUP)) {
- ec = ec_key_new_from_group(arg);
- } else {
- BIO *in = ossl_obj2bio(&arg);
- EVP_PKEY *tmp;
- pass = ossl_pem_passwd_value(pass);
- tmp = ossl_pkey_read_generic(in, pass);
- if (tmp) {
- if (EVP_PKEY_base_id(tmp) != EVP_PKEY_EC)
- rb_raise(eECError, "incorrect pkey type: %s",
- OBJ_nid2sn(EVP_PKEY_base_id(tmp)));
- ec = EVP_PKEY_get1_EC_KEY(tmp);
- EVP_PKEY_free(tmp);
- }
- BIO_free(in);
+ pass = ossl_pem_passwd_value(pass);
+ arg = ossl_to_der_if_possible(arg);
+ in = ossl_obj2bio(&arg);
- if (!ec) {
- ossl_clear_error();
- ec = ec_key_new_from_group(arg);
- }
+ pkey = ossl_pkey_read_generic(in, pass);
+ BIO_free(in);
+ if (!pkey) {
+ ossl_clear_error();
+ ec = ec_key_new_from_group(arg);
+ goto legacy;
}
- if (!EVP_PKEY_assign_EC_KEY(pkey, ec)) {
- EC_KEY_free(ec);
- ossl_raise(eECError, "EVP_PKEY_assign_EC_KEY");
+ type = EVP_PKEY_base_id(pkey);
+ if (type != EVP_PKEY_EC) {
+ EVP_PKEY_free(pkey);
+ rb_raise(eDSAError, "incorrect pkey type: %s", OBJ_nid2sn(type));
}
+ RTYPEDDATA_DATA(self) = pkey;
+ return self;
+ legacy:
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_EC_KEY(pkey, ec) != 1) {
+ EVP_PKEY_free(pkey);
+ EC_KEY_free(ec);
+ ossl_raise(eECError, "EVP_PKEY_assign_EC_KEY");
+ }
+ RTYPEDDATA_DATA(self) = pkey;
return self;
}
+#ifndef HAVE_EVP_PKEY_DUP
static VALUE
ossl_ec_key_initialize_copy(VALUE self, VALUE other)
{
EVP_PKEY *pkey;
EC_KEY *ec, *ec_new;
- GetPKey(self, pkey);
- if (EVP_PKEY_base_id(pkey) != EVP_PKEY_NONE)
- ossl_raise(eECError, "EC already initialized");
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
GetEC(other, ec);
ec_new = EC_KEY_dup(ec);
if (!ec_new)
ossl_raise(eECError, "EC_KEY_dup");
- if (!EVP_PKEY_assign_EC_KEY(pkey, ec_new)) {
- EC_KEY_free(ec_new);
- ossl_raise(eECError, "EVP_PKEY_assign_EC_KEY");
+
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_EC_KEY(pkey, ec_new) != 1) {
+ EC_KEY_free(ec_new);
+ ossl_raise(eECError, "EVP_PKEY_assign_EC_KEY");
}
+ RTYPEDDATA_DATA(self) = pkey;
return self;
}
+#endif
/*
* call-seq:
@@ -237,6 +248,9 @@ ossl_ec_key_get_group(VALUE self)
static VALUE
ossl_ec_key_set_group(VALUE self, VALUE group_v)
{
+#if OSSL_OPENSSL_PREREQ(3, 0, 0)
+ rb_raise(ePKeyError, "pkeys are immutable on OpenSSL 3.0");
+#else
EC_KEY *ec;
EC_GROUP *group;
@@ -247,6 +261,7 @@ ossl_ec_key_set_group(VALUE self, VALUE group_v)
ossl_raise(eECError, "EC_KEY_set_group");
return group_v;
+#endif
}
/*
@@ -275,6 +290,9 @@ static VALUE ossl_ec_key_get_private_key(VALUE self)
*/
static VALUE ossl_ec_key_set_private_key(VALUE self, VALUE private_key)
{
+#if OSSL_OPENSSL_PREREQ(3, 0, 0)
+ rb_raise(ePKeyError, "pkeys are immutable on OpenSSL 3.0");
+#else
EC_KEY *ec;
BIGNUM *bn = NULL;
@@ -294,6 +312,7 @@ static VALUE ossl_ec_key_set_private_key(VALUE self, VALUE private_key)
}
return private_key;
+#endif
}
/*
@@ -322,6 +341,9 @@ static VALUE ossl_ec_key_get_public_key(VALUE self)
*/
static VALUE ossl_ec_key_set_public_key(VALUE self, VALUE public_key)
{
+#if OSSL_OPENSSL_PREREQ(3, 0, 0)
+ rb_raise(ePKeyError, "pkeys are immutable on OpenSSL 3.0");
+#else
EC_KEY *ec;
EC_POINT *point = NULL;
@@ -341,6 +363,7 @@ static VALUE ossl_ec_key_set_public_key(VALUE self, VALUE public_key)
}
return public_key;
+#endif
}
/*
@@ -430,6 +453,9 @@ ossl_ec_key_to_der(VALUE self)
*/
static VALUE ossl_ec_key_generate_key(VALUE self)
{
+#if OSSL_OPENSSL_PREREQ(3, 0, 0)
+ rb_raise(ePKeyError, "pkeys are immutable on OpenSSL 3.0");
+#else
EC_KEY *ec;
GetEC(self, ec);
@@ -437,6 +463,7 @@ static VALUE ossl_ec_key_generate_key(VALUE self)
ossl_raise(eECError, "EC_KEY_generate_key");
return self;
+#endif
}
/*
@@ -1514,8 +1541,9 @@ void Init_ossl_ec(void)
rb_define_singleton_method(cEC, "generate", ossl_ec_key_s_generate, 1);
rb_define_method(cEC, "initialize", ossl_ec_key_initialize, -1);
+#ifndef HAVE_EVP_PKEY_DUP
rb_define_method(cEC, "initialize_copy", ossl_ec_key_initialize_copy, 1);
-/* copy/dup/cmp */
+#endif
rb_define_method(cEC, "group", ossl_ec_key_get_group, 0);
rb_define_method(cEC, "group=", ossl_ec_key_set_group, 1);
diff --git a/ext/openssl/ossl_pkey_rsa.c b/ext/openssl/ossl_pkey_rsa.c
index 8ebd3ec5590..4d66010f49f 100644
--- a/ext/openssl/ossl_pkey_rsa.c
+++ b/ext/openssl/ossl_pkey_rsa.c
@@ -76,73 +76,93 @@ VALUE eRSAError;
static VALUE
ossl_rsa_initialize(int argc, VALUE *argv, VALUE self)
{
- EVP_PKEY *pkey, *tmp;
- RSA *rsa = NULL;
- BIO *in;
+ EVP_PKEY *pkey;
+ RSA *rsa;
+ BIO *in = NULL;
VALUE arg, pass;
+ int type;
+
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
- GetPKey(self, pkey);
/* The RSA.new(size, generator) form is handled by lib/openssl/pkey.rb */
rb_scan_args(argc, argv, "02", &arg, &pass);
if (argc == 0) {
rsa = RSA_new();
if (!rsa)
ossl_raise(eRSAError, "RSA_new");
+ goto legacy;
}
- else {
- pass = ossl_pem_passwd_value(pass);
- arg = ossl_to_der_if_possible(arg);
- in = ossl_obj2bio(&arg);
-
- tmp = ossl_pkey_read_generic(in, pass);
- if (tmp) {
- if (EVP_PKEY_base_id(tmp) != EVP_PKEY_RSA)
- rb_raise(eRSAError, "incorrect pkey type: %s",
- OBJ_nid2sn(EVP_PKEY_base_id(tmp)));
- rsa = EVP_PKEY_get1_RSA(tmp);
- EVP_PKEY_free(tmp);
- }
- if (!rsa) {
- OSSL_BIO_reset(in);
- rsa = PEM_read_bio_RSAPublicKey(in, NULL, NULL, NULL);
- }
- if (!rsa) {
- OSSL_BIO_reset(in);
- rsa = d2i_RSAPublicKey_bio(in, NULL);
- }
- BIO_free(in);
- if (!rsa) {
- ossl_clear_error();
- ossl_raise(eRSAError, "Neither PUB key nor PRIV key");
- }
- }
- if (!EVP_PKEY_assign_RSA(pkey, rsa)) {
- RSA_free(rsa);
- ossl_raise(eRSAError, "EVP_PKEY_assign_RSA");
+
+ pass = ossl_pem_passwd_value(pass);
+ arg = ossl_to_der_if_possible(arg);
+ in = ossl_obj2bio(&arg);
+
+ /* First try RSAPublicKey format */
+ rsa = d2i_RSAPublicKey_bio(in, NULL);
+ if (rsa)
+ goto legacy;
+ OSSL_BIO_reset(in);
+ rsa = PEM_read_bio_RSAPublicKey(in, NULL, NULL, NULL);
+ if (rsa)
+ goto legacy;
+ OSSL_BIO_reset(in);
+
+ /* Use the generic routine */
+ pkey = ossl_pkey_read_generic(in, pass);
+ BIO_free(in);
+ if (!pkey)
+ ossl_raise(eRSAError, "Neither PUB key nor PRIV key");
+
+ type = EVP_PKEY_base_id(pkey);
+ if (type != EVP_PKEY_RSA) {
+ EVP_PKEY_free(pkey);
+ rb_raise(eRSAError, "incorrect pkey type: %s", OBJ_nid2sn(type));
}
+ RTYPEDDATA_DATA(self) = pkey;
+ return self;
+ legacy:
+ BIO_free(in);
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_RSA(pkey, rsa) != 1) {
+ EVP_PKEY_free(pkey);
+ RSA_free(rsa);
+ ossl_raise(eRSAError, "EVP_PKEY_assign_RSA");
+ }
+ RTYPEDDATA_DATA(self) = pkey;
return self;
}
+#ifndef HAVE_EVP_PKEY_DUP
static VALUE
ossl_rsa_initialize_copy(VALUE self, VALUE other)
{
EVP_PKEY *pkey;
RSA *rsa, *rsa_new;
- GetPKey(self, pkey);
- if (EVP_PKEY_base_id(pkey) != EVP_PKEY_NONE)
- ossl_raise(eRSAError, "RSA already initialized");
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
GetRSA(other, rsa);
- rsa_new = ASN1_dup((i2d_of_void *)i2d_RSAPrivateKey, (d2i_of_void *)d2i_RSAPrivateKey, (char *)rsa);
+ rsa_new = (RSA *)ASN1_dup((i2d_of_void *)i2d_RSAPrivateKey,
+ (d2i_of_void *)d2i_RSAPrivateKey,
+ (char *)rsa);
if (!rsa_new)
ossl_raise(eRSAError, "ASN1_dup");
- EVP_PKEY_assign_RSA(pkey, rsa_new);
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_RSA(pkey, rsa_new) != 1) {
+ RSA_free(rsa_new);
+ ossl_raise(eRSAError, "EVP_PKEY_assign_RSA");
+ }
+ RTYPEDDATA_DATA(self) = pkey;
return self;
}
+#endif
/*
* call-seq:
@@ -517,7 +537,9 @@ Init_ossl_rsa(void)
cRSA = rb_define_class_under(mPKey, "RSA", cPKey);
rb_define_method(cRSA, "initialize", ossl_rsa_initialize, -1);
+#ifndef HAVE_EVP_PKEY_DUP
rb_define_method(cRSA, "initialize_copy", ossl_rsa_initialize_copy, 1);
+#endif
rb_define_method(cRSA, "public?", ossl_rsa_is_public, 0);
rb_define_method(cRSA, "private?", ossl_rsa_is_private, 0);
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index 28286574574..9a0682a7cdc 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -1704,8 +1704,7 @@ ossl_start_ssl(VALUE self, int (*func)(), const char *funcname, VALUE opts)
* call-seq:
* ssl.connect => self
*
- * Initiates an SSL/TLS handshake with a server. The handshake may be started
- * after unencrypted data has been sent over the socket.
+ * Initiates an SSL/TLS handshake with a server.
*/
static VALUE
ossl_ssl_connect(VALUE self)
@@ -1752,8 +1751,7 @@ ossl_ssl_connect_nonblock(int argc, VALUE *argv, VALUE self)
* call-seq:
* ssl.accept => self
*
- * Waits for a SSL/TLS client to initiate a handshake. The handshake may be
- * started after unencrypted data has been sent over the socket.
+ * Waits for a SSL/TLS client to initiate a handshake.
*/
static VALUE
ossl_ssl_accept(VALUE self)
@@ -1800,7 +1798,7 @@ static VALUE
ossl_ssl_read_internal(int argc, VALUE *argv, VALUE self, int nonblock)
{
SSL *ssl;
- int ilen, nread = 0;
+ int ilen;
VALUE len, str;
rb_io_t *fptr;
VALUE io, opts = Qnil;
@@ -1810,6 +1808,9 @@ ossl_ssl_read_internal(int argc, VALUE *argv, VALUE self, int nonblock)
} else {
rb_scan_args(argc, argv, "11", &len, &str);
}
+ GetSSL(self, ssl);
+ if (!ssl_started(ssl))
+ rb_raise(eSSLError, "SSL session is not started yet");
ilen = NUM2INT(len);
if (NIL_P(str))
@@ -1825,85 +1826,60 @@ ossl_ssl_read_internal(int argc, VALUE *argv, VALUE self, int nonblock)
if (ilen == 0)
return str;
- GetSSL(self, ssl);
io = rb_attr_get(self, id_i_io);
GetOpenFile(io, fptr);
- if (ssl_started(ssl)) {
- rb_str_locktmp(str);
- for (;;) {
- nread = SSL_read(ssl, RSTRING_PTR(str), ilen);
- switch(ssl_get_error(ssl, nread)){
- case SSL_ERROR_NONE:
+
+ rb_str_locktmp(str);
+ for (;;) {
+ int nread = SSL_read(ssl, RSTRING_PTR(str), ilen);
+ switch (ssl_get_error(ssl, nread)) {
+ case SSL_ERROR_NONE:
+ rb_str_unlocktmp(str);
+ rb_str_set_len(str, nread);
+ return str;
+ case SSL_ERROR_ZERO_RETURN:
+ rb_str_unlocktmp(str);
+ if (no_exception_p(opts)) { return Qnil; }
+ rb_eof_error();
+ case SSL_ERROR_WANT_WRITE:
+ if (nonblock) {
rb_str_unlocktmp(str);
- goto end;
- case SSL_ERROR_ZERO_RETURN:
+ if (no_exception_p(opts)) { return sym_wait_writable; }
+ write_would_block(nonblock);
+ }
+ io_wait_writable(fptr);
+ continue;
+ case SSL_ERROR_WANT_READ:
+ if (nonblock) {
rb_str_unlocktmp(str);
- if (no_exception_p(opts)) { return Qnil; }
- rb_eof_error();
- case SSL_ERROR_WANT_WRITE:
- if (nonblock) {
- rb_str_unlocktmp(str);
- if (no_exception_p(opts)) { return sym_wait_writable; }
- write_would_block(nonblock);
- }
- io_wait_writable(fptr);
- continue;
- case SSL_ERROR_WANT_READ:
- if (nonblock) {
- rb_str_unlocktmp(str);
- if (no_exception_p(opts)) { return sym_wait_readable; }
- read_would_block(nonblock);
- }
- io_wait_readable(fptr);
- continue;
- case SSL_ERROR_SYSCALL:
- if (!ERR_peek_error()) {
- rb_str_unlocktmp(str);
- if (errno)
- rb_sys_fail(0);
- else {
- /*
- * The underlying BIO returned 0. This is actually a
- * protocol error. But unfortunately, not all
- * implementations cleanly shutdown the TLS connection
- * but just shutdown/close the TCP connection. So report
- * EOF for now...
- */
- if (no_exception_p(opts)) { return Qnil; }
- rb_eof_error();
- }
- }
- /* fall through */
- default:
+ if (no_exception_p(opts)) { return sym_wait_readable; }
+ read_would_block(nonblock);
+ }
+ io_wait_readable(fptr);
+ continue;
+ case SSL_ERROR_SYSCALL:
+ if (!ERR_peek_error()) {
rb_str_unlocktmp(str);
- ossl_raise(eSSLError, "SSL_read");
- }
- }
- }
- else {
- ID meth = nonblock ? rb_intern("read_nonblock") : rb_intern("sysread");
-
- rb_warning("SSL session is not started yet.");
-#if defined(RB_PASS_KEYWORDS)
- if (nonblock) {
- VALUE argv[3];
- argv[0] = len;
- argv[1] = str;
- argv[2] = opts;
- return rb_funcallv_kw(io, meth, 3, argv, RB_PASS_KEYWORDS);
- }
-#else
- if (nonblock) {
- return rb_funcall(io, meth, 3, len, str, opts);
+ if (errno)
+ rb_sys_fail(0);
+ else {
+ /*
+ * The underlying BIO returned 0. This is actually a
+ * protocol error. But unfortunately, not all
+ * implementations cleanly shutdown the TLS connection
+ * but just shutdown/close the TCP connection. So report
+ * EOF for now...
+ */
+ if (no_exception_p(opts)) { return Qnil; }
+ rb_eof_error();
+ }
+ }
+ /* fall through */
+ default:
+ rb_str_unlocktmp(str);
+ ossl_raise(eSSLError, "SSL_read");
}
-#endif
- else
- return rb_funcall(io, meth, 2, len, str);
}
-
- end:
- rb_str_set_len(str, nread);
- return str;
}
/*
@@ -1943,78 +1919,55 @@ static VALUE
ossl_ssl_write_internal(VALUE self, VALUE str, VALUE opts)
{
SSL *ssl;
- int nwrite = 0;
rb_io_t *fptr;
- int nonblock = opts != Qfalse;
+ int num, nonblock = opts != Qfalse;
VALUE tmp, io;
- tmp = rb_str_new_frozen(StringValue(str));
GetSSL(self, ssl);
+ if (!ssl_started(ssl))
+ rb_raise(eSSLError, "SSL session is not started yet");
+
+ tmp = rb_str_new_frozen(StringValue(str));
io = rb_attr_get(self, id_i_io);
GetOpenFile(io, fptr);
- if (ssl_started(ssl)) {
- for (;;) {
- int num = RSTRING_LENINT(tmp);
-
- /* SSL_write(3ssl) manpage states num == 0 is undefined */
- if (num == 0)
- goto end;
-
- nwrite = SSL_write(ssl, RSTRING_PTR(tmp), num);
- switch(ssl_get_error(ssl, nwrite)){
- case SSL_ERROR_NONE:
- goto end;
- case SSL_ERROR_WANT_WRITE:
- if (no_exception_p(opts)) { return sym_wait_writable; }
- write_would_block(nonblock);
- io_wait_writable(fptr);
- continue;
- case SSL_ERROR_WANT_READ:
- if (no_exception_p(opts)) { return sym_wait_readable; }
- read_would_block(nonblock);
- io_wait_readable(fptr);
- continue;
- case SSL_ERROR_SYSCALL:
+
+ /* SSL_write(3ssl) manpage states num == 0 is undefined */
+ num = RSTRING_LENINT(tmp);
+ if (num == 0)
+ return INT2FIX(0);
+
+ for (;;) {
+ int nwritten = SSL_write(ssl, RSTRING_PTR(tmp), num);
+ switch (ssl_get_error(ssl, nwritten)) {
+ case SSL_ERROR_NONE:
+ return INT2NUM(nwritten);
+ case SSL_ERROR_WANT_WRITE:
+ if (no_exception_p(opts)) { return sym_wait_writable; }
+ write_would_block(nonblock);
+ io_wait_writable(fptr);
+ continue;
+ case SSL_ERROR_WANT_READ:
+ if (no_exception_p(opts)) { return sym_wait_readable; }
+ read_would_block(nonblock);
+ io_wait_readable(fptr);
+ continue;
+ case SSL_ERROR_SYSCALL:
#ifdef __APPLE__
- /*
- * It appears that send syscall can return EPROTOTYPE if the
- * socket is being torn down. Retry to get a proper errno to
- * make the error handling in line with the socket library.
- * [Bug #14713] https://bugs.ruby-lang.org/issues/14713
- */
- if (errno == EPROTOTYPE)
- continue;
+ /*
+ * It appears that send syscall can return EPROTOTYPE if the
+ * socket is being torn down. Retry to get a proper errno to
+ * make the error handling in line with the socket library.
+ * [Bug #14713] https://bugs.ruby-lang.org/issues/14713
+ */
+ if (errno == EPROTOTYPE)
+ continue;
#endif
- if (errno) rb_sys_fail(0);
- /* fallthrough */
- default:
- ossl_raise(eSSLError, "SSL_write");
- }
+ if (errno) rb_sys_fail(0);
+ /* fallthrough */
+ default:
+ ossl_raise(eSSLError, "SSL_write");
}
}
- else {
- ID meth = nonblock ?
- rb_intern("write_nonblock") : rb_intern("syswrite");
-
- rb_warning("SSL session is not started yet.");
-#if defined(RB_PASS_KEYWORDS)
- if (nonblock) {
- VALUE argv[2];
- argv[0] = str;
- argv[1] = opts;
- return rb_funcallv_kw(io, meth, 2, argv, RB_PASS_KEYWORDS);
- }
-#else
- if (nonblock) {
- return rb_funcall(io, meth, 2, str, opts);
- }
-#endif
- else
- return rb_funcall(io, meth, 1, str);
- }
-
- end:
- return INT2NUM(nwrite);
}
/*
@@ -2872,9 +2825,24 @@ Init_ossl_ssl(void)
rb_define_const(mSSL, "VERIFY_CLIENT_ONCE", INT2NUM(SSL_VERIFY_CLIENT_ONCE));
rb_define_const(mSSL, "OP_ALL", ULONG2NUM(SSL_OP_ALL));
+#ifdef SSL_OP_CLEANSE_PLAINTEXT /* OpenSSL 3.0 */
+ rb_define_const(mSSL, "OP_CLEANSE_PLAINTEXT", ULONG2NUM(SSL_OP_CLEANSE_PLAINTEXT));
+#endif
rb_define_const(mSSL, "OP_LEGACY_SERVER_CONNECT", ULONG2NUM(SSL_OP_LEGACY_SERVER_CONNECT));
+#ifdef SSL_OP_ENABLE_KTLS /* OpenSSL 3.0 */
+ rb_define_const(mSSL, "OP_ENABLE_KTLS", ULONG2NUM(SSL_OP_ENABLE_KTLS));
+#endif
rb_define_const(mSSL, "OP_TLSEXT_PADDING", ULONG2NUM(SSL_OP_TLSEXT_PADDING));
rb_define_const(mSSL, "OP_SAFARI_ECDHE_ECDSA_BUG", ULONG2NUM(SSL_OP_SAFARI_ECDHE_ECDSA_BUG));
+#ifdef SSL_OP_IGNORE_UNEXPECTED_EOF /* OpenSSL 3.0 */
+ rb_define_const(mSSL, "OP_IGNORE_UNEXPECTED_EOF", ULONG2NUM(SSL_OP_IGNORE_UNEXPECTED_EOF));
+#endif
+#ifdef SSL_OP_ALLOW_CLIENT_RENEGOTIATION /* OpenSSL 3.0 */
+ rb_define_const(mSSL, "OP_ALLOW_CLIENT_RENEGOTIATION", ULONG2NUM(SSL_OP_ALLOW_CLIENT_RENEGOTIATION));
+#endif
+#ifdef SSL_OP_DISABLE_TLSEXT_CA_NAMES /* OpenSSL 3.0 */
+ rb_define_const(mSSL, "OP_DISABLE_TLSEXT_CA_NAMES", ULONG2NUM(SSL_OP_DISABLE_TLSEXT_CA_NAMES));
+#endif
#ifdef SSL_OP_ALLOW_NO_DHE_KEX /* OpenSSL 1.1.1 */
rb_define_const(mSSL, "OP_ALLOW_NO_DHE_KEX", ULONG2NUM(SSL_OP_ALLOW_NO_DHE_KEX));
#endif
@@ -2886,13 +2854,15 @@ Init_ossl_ssl(void)
#ifdef SSL_OP_NO_ENCRYPT_THEN_MAC /* OpenSSL 1.1.1 */
rb_define_const(mSSL, "OP_NO_ENCRYPT_THEN_MAC", ULONG2NUM(SSL_OP_NO_ENCRYPT_THEN_MAC));
#endif
- rb_define_const(mSSL, "OP_CIPHER_SERVER_PREFERENCE", ULONG2NUM(SSL_OP_CIPHER_SERVER_PREFERENCE));
- rb_define_const(mSSL, "OP_TLS_ROLLBACK_BUG", ULONG2NUM(SSL_OP_TLS_ROLLBACK_BUG));
-#ifdef SSL_OP_NO_RENEGOTIATION /* OpenSSL 1.1.1 */
- rb_define_const(mSSL, "OP_NO_RENEGOTIATION", ULONG2NUM(SSL_OP_NO_RENEGOTIATION));
+#ifdef SSL_OP_ENABLE_MIDDLEBOX_COMPAT /* OpenSSL 1.1.1 */
+ rb_define_const(mSSL, "OP_ENABLE_MIDDLEBOX_COMPAT", ULONG2NUM(SSL_OP_ENABLE_MIDDLEBOX_COMPAT));
+#endif
+#ifdef SSL_OP_PRIORITIZE_CHACHA /* OpenSSL 1.1.1 */
+ rb_define_const(mSSL, "OP_PRIORITIZE_CHACHA", ULONG2NUM(SSL_OP_PRIORITIZE_CHACHA));
+#endif
+#ifdef SSL_OP_NO_ANTI_REPLAY /* OpenSSL 1.1.1 */
+ rb_define_const(mSSL, "OP_NO_ANTI_REPLAY", ULONG2NUM(SSL_OP_NO_ANTI_REPLAY));
#endif
- rb_define_const(mSSL, "OP_CRYPTOPRO_TLSEXT_BUG", ULONG2NUM(SSL_OP_CRYPTOPRO_TLSEXT_BUG));
-
rb_define_const(mSSL, "OP_NO_SSLv3", ULONG2NUM(SSL_OP_NO_SSLv3));
rb_define_const(mSSL, "OP_NO_TLSv1", ULONG2NUM(SSL_OP_NO_TLSv1));
rb_define_const(mSSL, "OP_NO_TLSv1_1", ULONG2NUM(SSL_OP_NO_TLSv1_1));
@@ -2900,6 +2870,12 @@ Init_ossl_ssl(void)
#ifdef SSL_OP_NO_TLSv1_3 /* OpenSSL 1.1.1 */
rb_define_const(mSSL, "OP_NO_TLSv1_3", ULONG2NUM(SSL_OP_NO_TLSv1_3));
#endif
+ rb_define_const(mSSL, "OP_CIPHER_SERVER_PREFERENCE", ULONG2NUM(SSL_OP_CIPHER_SERVER_PREFERENCE));
+ rb_define_const(mSSL, "OP_TLS_ROLLBACK_BUG", ULONG2NUM(SSL_OP_TLS_ROLLBACK_BUG));
+#ifdef SSL_OP_NO_RENEGOTIATION /* OpenSSL 1.1.1 */
+ rb_define_const(mSSL, "OP_NO_RENEGOTIATION", ULONG2NUM(SSL_OP_NO_RENEGOTIATION));
+#endif
+ rb_define_const(mSSL, "OP_CRYPTOPRO_TLSEXT_BUG", ULONG2NUM(SSL_OP_CRYPTOPRO_TLSEXT_BUG));
/* SSL_OP_* flags for DTLS */
#if 0
diff --git a/ext/openssl/ossl_x509name.c b/ext/openssl/ossl_x509name.c
index 1522c3d897c..13a2b2c030f 100644
--- a/ext/openssl/ossl_x509name.c
+++ b/ext/openssl/ossl_x509name.c
@@ -291,7 +291,14 @@ x509name_print(VALUE self, unsigned long iflag)
* * OpenSSL::X509::Name::MULTILINE
*
* If _format_ is omitted, the largely broken and traditional OpenSSL format
- * is used.
+ * (<tt>X509_NAME_oneline()</tt> format) is chosen.
+ *
+ * <b>Use of this method is discouraged.</b> None of the formats other than
+ * OpenSSL::X509::Name::RFC2253 is standardized and may show an inconsistent
+ * behavior through \OpenSSL versions.
+ *
+ * It is recommended to use #to_utf8 instead, which is equivalent to calling
+ * <tt>name.to_s(OpenSSL::X509::Name::RFC2253).force_encoding("UTF-8")</tt>.
*/
static VALUE
ossl_x509name_to_s(int argc, VALUE *argv, VALUE self)
@@ -498,7 +505,7 @@ ossl_x509name_to_der(VALUE self)
* You can create a Name by parsing a distinguished name String or by
* supplying the distinguished name as an Array.
*
- * name = OpenSSL::X509::Name.parse '/CN=nobody/DC=example'
+ * name = OpenSSL::X509::Name.parse_rfc2253 'DC=example,CN=nobody'
*
* name = OpenSSL::X509::Name.new [['CN', 'nobody'], ['DC', 'example']]
*/
diff --git a/ext/pathname/depend b/ext/pathname/depend
index 0860334b7f1..53041d2ef86 100644
--- a/ext/pathname/depend
+++ b/ext/pathname/depend
@@ -7,7 +7,6 @@ pathname.o: $(hdrdir)/ruby/backward.h
pathname.o: $(hdrdir)/ruby/backward/2/assume.h
pathname.o: $(hdrdir)/ruby/backward/2/attributes.h
pathname.o: $(hdrdir)/ruby/backward/2/bool.h
-pathname.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
pathname.o: $(hdrdir)/ruby/backward/2/inttypes.h
pathname.o: $(hdrdir)/ruby/backward/2/limits.h
pathname.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c
index 1d4ed2814bb..00ca85205bb 100644
--- a/ext/pathname/pathname.c
+++ b/ext/pathname/pathname.c
@@ -1274,6 +1274,7 @@ static VALUE
path_each_entry(VALUE self)
{
VALUE args[1];
+ RETURN_ENUMERATOR(self, 0, 0);
args[0] = get_strpath(self);
return rb_block_call(rb_cDir, id_foreach, 1, args, each_entry_i, rb_obj_class(self));
diff --git a/ext/pathname/pathname.gemspec b/ext/pathname/pathname.gemspec
index 5aaa8f8dd71..c9c0b84e690 100644
--- a/ext/pathname/pathname.gemspec
+++ b/ext/pathname/pathname.gemspec
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
spec.summary = %q{Representation of the name of a file or directory on the filesystem}
spec.description = %q{Representation of the name of a file or directory on the filesystem}
spec.homepage = "https://github.com/ruby/pathname"
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
spec.licenses = ["Ruby", "BSD-2-Clause"]
spec.metadata["homepage_uri"] = spec.homepage
diff --git a/ext/psych/depend b/ext/psych/depend
index ef55b78c33c..44486635312 100644
--- a/ext/psych/depend
+++ b/ext/psych/depend
@@ -1,31 +1,6 @@
$(OBJS): $(YAML_H)
# AUTOGENERATED DEPENDENCIES START
-api.o: $(RUBY_EXTCONF_H)
-api.o: yaml/api.c
-api.o: yaml/config.h
-api.o: yaml/yaml.h
-api.o: yaml/yaml_private.h
-dumper.o: $(RUBY_EXTCONF_H)
-dumper.o: yaml/config.h
-dumper.o: yaml/dumper.c
-dumper.o: yaml/yaml.h
-dumper.o: yaml/yaml_private.h
-emitter.o: $(RUBY_EXTCONF_H)
-emitter.o: yaml/config.h
-emitter.o: yaml/emitter.c
-emitter.o: yaml/yaml.h
-emitter.o: yaml/yaml_private.h
-loader.o: $(RUBY_EXTCONF_H)
-loader.o: yaml/config.h
-loader.o: yaml/loader.c
-loader.o: yaml/yaml.h
-loader.o: yaml/yaml_private.h
-parser.o: $(RUBY_EXTCONF_H)
-parser.o: yaml/config.h
-parser.o: yaml/parser.c
-parser.o: yaml/yaml.h
-parser.o: yaml/yaml_private.h
psych.o: $(RUBY_EXTCONF_H)
psych.o: $(arch_hdrdir)/ruby/config.h
psych.o: $(hdrdir)/ruby.h
@@ -34,7 +9,6 @@ psych.o: $(hdrdir)/ruby/backward.h
psych.o: $(hdrdir)/ruby/backward/2/assume.h
psych.o: $(hdrdir)/ruby/backward/2/attributes.h
psych.o: $(hdrdir)/ruby/backward/2/bool.h
-psych.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
psych.o: $(hdrdir)/ruby/backward/2/inttypes.h
psych.o: $(hdrdir)/ruby/backward/2/limits.h
psych.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -203,7 +177,6 @@ psych.o: psych_emitter.h
psych.o: psych_parser.h
psych.o: psych_to_ruby.h
psych.o: psych_yaml_tree.h
-psych.o: yaml/yaml.h
psych_emitter.o: $(RUBY_EXTCONF_H)
psych_emitter.o: $(arch_hdrdir)/ruby/config.h
psych_emitter.o: $(hdrdir)/ruby.h
@@ -212,7 +185,6 @@ psych_emitter.o: $(hdrdir)/ruby/backward.h
psych_emitter.o: $(hdrdir)/ruby/backward/2/assume.h
psych_emitter.o: $(hdrdir)/ruby/backward/2/attributes.h
psych_emitter.o: $(hdrdir)/ruby/backward/2/bool.h
-psych_emitter.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
psych_emitter.o: $(hdrdir)/ruby/backward/2/inttypes.h
psych_emitter.o: $(hdrdir)/ruby/backward/2/limits.h
psych_emitter.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -381,7 +353,6 @@ psych_emitter.o: psych_emitter.h
psych_emitter.o: psych_parser.h
psych_emitter.o: psych_to_ruby.h
psych_emitter.o: psych_yaml_tree.h
-psych_emitter.o: yaml/yaml.h
psych_parser.o: $(RUBY_EXTCONF_H)
psych_parser.o: $(arch_hdrdir)/ruby/config.h
psych_parser.o: $(hdrdir)/ruby.h
@@ -390,7 +361,6 @@ psych_parser.o: $(hdrdir)/ruby/backward.h
psych_parser.o: $(hdrdir)/ruby/backward/2/assume.h
psych_parser.o: $(hdrdir)/ruby/backward/2/attributes.h
psych_parser.o: $(hdrdir)/ruby/backward/2/bool.h
-psych_parser.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
psych_parser.o: $(hdrdir)/ruby/backward/2/inttypes.h
psych_parser.o: $(hdrdir)/ruby/backward/2/limits.h
psych_parser.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -559,7 +529,6 @@ psych_parser.o: psych_parser.c
psych_parser.o: psych_parser.h
psych_parser.o: psych_to_ruby.h
psych_parser.o: psych_yaml_tree.h
-psych_parser.o: yaml/yaml.h
psych_to_ruby.o: $(RUBY_EXTCONF_H)
psych_to_ruby.o: $(arch_hdrdir)/ruby/config.h
psych_to_ruby.o: $(hdrdir)/ruby.h
@@ -568,7 +537,6 @@ psych_to_ruby.o: $(hdrdir)/ruby/backward.h
psych_to_ruby.o: $(hdrdir)/ruby/backward/2/assume.h
psych_to_ruby.o: $(hdrdir)/ruby/backward/2/attributes.h
psych_to_ruby.o: $(hdrdir)/ruby/backward/2/bool.h
-psych_to_ruby.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
psych_to_ruby.o: $(hdrdir)/ruby/backward/2/inttypes.h
psych_to_ruby.o: $(hdrdir)/ruby/backward/2/limits.h
psych_to_ruby.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -737,7 +705,6 @@ psych_to_ruby.o: psych_parser.h
psych_to_ruby.o: psych_to_ruby.c
psych_to_ruby.o: psych_to_ruby.h
psych_to_ruby.o: psych_yaml_tree.h
-psych_to_ruby.o: yaml/yaml.h
psych_yaml_tree.o: $(RUBY_EXTCONF_H)
psych_yaml_tree.o: $(arch_hdrdir)/ruby/config.h
psych_yaml_tree.o: $(hdrdir)/ruby.h
@@ -746,7 +713,6 @@ psych_yaml_tree.o: $(hdrdir)/ruby/backward.h
psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/assume.h
psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/attributes.h
psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/bool.h
-psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/inttypes.h
psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/limits.h
psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -915,20 +881,4 @@ psych_yaml_tree.o: psych_parser.h
psych_yaml_tree.o: psych_to_ruby.h
psych_yaml_tree.o: psych_yaml_tree.c
psych_yaml_tree.o: psych_yaml_tree.h
-psych_yaml_tree.o: yaml/yaml.h
-reader.o: $(RUBY_EXTCONF_H)
-reader.o: yaml/config.h
-reader.o: yaml/reader.c
-reader.o: yaml/yaml.h
-reader.o: yaml/yaml_private.h
-scanner.o: $(RUBY_EXTCONF_H)
-scanner.o: yaml/config.h
-scanner.o: yaml/scanner.c
-scanner.o: yaml/yaml.h
-scanner.o: yaml/yaml_private.h
-writer.o: $(RUBY_EXTCONF_H)
-writer.o: yaml/config.h
-writer.o: yaml/writer.c
-writer.o: yaml/yaml.h
-writer.o: yaml/yaml_private.h
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/psych/lib/psych.rb b/ext/psych/lib/psych.rb
index 383078788fd..42d79efb832 100644
--- a/ext/psych/lib/psych.rb
+++ b/ext/psych/lib/psych.rb
@@ -268,12 +268,11 @@ module Psych
# YAML documents that are supplied via user input. Instead, please use the
# load method or the safe_load method.
#
- def self.unsafe_load yaml, filename: nil, fallback: false, symbolize_names: false, freeze: false
+ def self.unsafe_load yaml, filename: nil, fallback: false, symbolize_names: false, freeze: false, strict_integer: false
result = parse(yaml, filename: filename)
return fallback unless result
- result.to_ruby(symbolize_names: symbolize_names, freeze: freeze)
+ result.to_ruby(symbolize_names: symbolize_names, freeze: freeze, strict_integer: strict_integer)
end
- class << self; alias :load :unsafe_load; end
###
# Safely load the yaml string in +yaml+. By default, only the following
@@ -320,13 +319,13 @@ module Psych
# Psych.safe_load("---\n foo: bar") # => {"foo"=>"bar"}
# Psych.safe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"}
#
- def self.safe_load yaml, permitted_classes: [], permitted_symbols: [], aliases: false, filename: nil, fallback: nil, symbolize_names: false, freeze: false
+ def self.safe_load yaml, permitted_classes: [], permitted_symbols: [], aliases: false, filename: nil, fallback: nil, symbolize_names: false, freeze: false, strict_integer: false
result = parse(yaml, filename: filename)
return fallback unless result
class_loader = ClassLoader::Restricted.new(permitted_classes.map(&:to_s),
permitted_symbols.map(&:to_s))
- scanner = ScalarScanner.new class_loader
+ scanner = ScalarScanner.new class_loader, strict_integer: strict_integer
visitor = if aliases
Visitors::ToRuby.new scanner, class_loader, symbolize_names: symbolize_names, freeze: freeze
else
@@ -366,14 +365,15 @@ module Psych
# Raises a TypeError when `yaml` parameter is NilClass. This method is
# similar to `safe_load` except that `Symbol` objects are allowed by default.
#
- def self.load yaml, permitted_classes: [Symbol], permitted_symbols: [], aliases: false, filename: nil, fallback: nil, symbolize_names: false, freeze: false
+ def self.load yaml, permitted_classes: [Symbol], permitted_symbols: [], aliases: false, filename: nil, fallback: nil, symbolize_names: false, freeze: false, strict_integer: false
safe_load yaml, permitted_classes: permitted_classes,
permitted_symbols: permitted_symbols,
aliases: aliases,
filename: filename,
fallback: fallback,
symbolize_names: symbolize_names,
- freeze: freeze
+ freeze: freeze,
+ strict_integer: strict_integer
end
###
diff --git a/ext/psych/lib/psych/nodes/node.rb b/ext/psych/lib/psych/nodes/node.rb
index 1f841625ca4..f44fce5f053 100644
--- a/ext/psych/lib/psych/nodes/node.rb
+++ b/ext/psych/lib/psych/nodes/node.rb
@@ -46,8 +46,8 @@ module Psych
# Convert this node to Ruby.
#
# See also Psych::Visitors::ToRuby
- def to_ruby(symbolize_names: false, freeze: false)
- Visitors::ToRuby.create(symbolize_names: symbolize_names, freeze: freeze).accept(self)
+ def to_ruby(symbolize_names: false, freeze: false, strict_integer: false)
+ Visitors::ToRuby.create(symbolize_names: symbolize_names, freeze: freeze, strict_integer: strict_integer).accept(self)
end
alias :transform :to_ruby
diff --git a/ext/psych/lib/psych/scalar_scanner.rb b/ext/psych/lib/psych/scalar_scanner.rb
index b66ff9938cc..58deea3baa5 100644
--- a/ext/psych/lib/psych/scalar_scanner.rb
+++ b/ext/psych/lib/psych/scalar_scanner.rb
@@ -1,5 +1,4 @@
# frozen_string_literal: true
-require 'strscan'
module Psych
###
@@ -13,24 +12,32 @@ module Psych
FLOAT = /^(?:[-+]?([0-9][0-9_,]*)?\.[0-9]*([eE][-+][0-9]+)?(?# base 10))$/x
# Taken from http://yaml.org/type/int.html
- INTEGER = /^(?:[-+]?0b[0-1_,]+ (?# base 2)
- |[-+]?0[0-7_,]+ (?# base 8)
- |[-+]?(?:0|[1-9](?:[0-9]|,[0-9]|_[0-9])*) (?# base 10)
- |[-+]?0x[0-9a-fA-F_,]+ (?# base 16))$/x
+ INTEGER_STRICT = /^(?:[-+]?0b[0-1_]+ (?# base 2)
+ |[-+]?0[0-7_]+ (?# base 8)
+ |[-+]?(0|[1-9][0-9_]*) (?# base 10)
+ |[-+]?0x[0-9a-fA-F_]+ (?# base 16))$/x
+
+ # Same as above, but allows commas.
+ # Not to YML spec, but kept for backwards compatibility
+ INTEGER_LEGACY = /^(?:[-+]?0b[0-1_,]+ (?# base 2)
+ |[-+]?0[0-7_,]+ (?# base 8)
+ |[-+]?(?:0|[1-9](?:[0-9]|,[0-9]|_[0-9])*) (?# base 10)
+ |[-+]?0x[0-9a-fA-F_,]+ (?# base 16))$/x
attr_reader :class_loader
# Create a new scanner
- def initialize class_loader
+ def initialize class_loader, strict_integer: false
@symbol_cache = {}
@class_loader = class_loader
+ @strict_integer = strict_integer
end
# Tokenize +string+ returning the Ruby object
def tokenize string
return nil if string.empty?
return @symbol_cache[string] if @symbol_cache.key?(string)
-
+ integer_regex = @strict_integer ? INTEGER_STRICT : INTEGER_LEGACY
# Check for a String type, being careful not to get caught by hash keys, hex values, and
# special floats (e.g., -.inf).
if string.match?(%r{^[^\d.:-]?[[:alpha:]_\s!@#$%\^&*(){}<>|/\\~;=]+}) || string.match?(/\n/)
@@ -90,7 +97,7 @@ module Psych
else
Float(string.gsub(/[,_]|\.([Ee]|$)/, '\1'))
end
- elsif string.match?(INTEGER)
+ elsif string.match?(integer_regex)
parse_int string
else
string
diff --git a/ext/psych/lib/psych/versions.rb b/ext/psych/lib/psych/versions.rb
index 0519d9c8abc..3cfd59e7516 100644
--- a/ext/psych/lib/psych/versions.rb
+++ b/ext/psych/lib/psych/versions.rb
@@ -2,7 +2,7 @@
module Psych
# The version of Psych you are using
- VERSION = '4.0.2'
+ VERSION = '4.0.3'
if RUBY_ENGINE == 'jruby'
DEFAULT_SNAKEYAML_VERSION = '1.28'.freeze
diff --git a/ext/psych/lib/psych/visitors/to_ruby.rb b/ext/psych/lib/psych/visitors/to_ruby.rb
index 4c1f5610703..935bc74f21c 100644
--- a/ext/psych/lib/psych/visitors/to_ruby.rb
+++ b/ext/psych/lib/psych/visitors/to_ruby.rb
@@ -12,9 +12,9 @@ module Psych
###
# This class walks a YAML AST, converting each node to Ruby
class ToRuby < Psych::Visitors::Visitor
- def self.create(symbolize_names: false, freeze: false)
+ def self.create(symbolize_names: false, freeze: false, strict_integer: false)
class_loader = ClassLoader.new
- scanner = ScalarScanner.new class_loader
+ scanner = ScalarScanner.new class_loader, strict_integer: strict_integer
new(scanner, class_loader, symbolize_names: symbolize_names, freeze: freeze)
end
diff --git a/ext/psych/psych.gemspec b/ext/psych/psych.gemspec
index 291d8345b47..65dd7156cbf 100644
--- a/ext/psych/psych.gemspec
+++ b/ext/psych/psych.gemspec
@@ -63,7 +63,7 @@ DESCRIPTION
s.add_dependency 'jar-dependencies', '>= 0.1.7'
else
s.extensions = ["ext/psych/extconf.rb"]
+ s.add_dependency 'stringio'
end
- s.add_dependency 'stringio'
end
diff --git a/ext/pty/depend b/ext/pty/depend
index 984314c8705..7baded100cf 100644
--- a/ext/pty/depend
+++ b/ext/pty/depend
@@ -1,7 +1,6 @@
# AUTOGENERATED DEPENDENCIES START
pty.o: $(RUBY_EXTCONF_H)
pty.o: $(arch_hdrdir)/ruby/config.h
-pty.o: $(hdrdir)/ruby.h
pty.o: $(hdrdir)/ruby/assert.h
pty.o: $(hdrdir)/ruby/backward.h
pty.o: $(hdrdir)/ruby/backward/2/assume.h
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index 72074f74210..cb663ab2de2 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -389,14 +389,7 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
c"0",c"1",c"2",c"3",c"4",c"5",c"6",c"7", \
c"8",c"9",c"a",c"b",c"c",c"d",c"e",c"f"
-#if defined(__hpux)
- static const char MasterDevice[] = "/dev/ptym/pty%s";
- static const char SlaveDevice[] = "/dev/pty/tty%s";
- static const char deviceNo[][3] = {
- HEX1("p"), HEX1("q"), HEX1("r"), HEX1("s"),
- HEX1("t"), HEX1("u"), HEX1("v"), HEX1("w"),
- };
-#elif defined(_IBMESA) /* AIX/ESA */
+#if defined(_IBMESA) /* AIX/ESA */
static const char MasterDevice[] = "/dev/ptyp%s";
static const char SlaveDevice[] = "/dev/ttyp%s";
static const char deviceNo[][3] = {
diff --git a/ext/racc/cparse/depend b/ext/racc/cparse/depend
index 556c47fbd52..cb2a1b6bd69 100644
--- a/ext/racc/cparse/depend
+++ b/ext/racc/cparse/depend
@@ -2,6 +2,18 @@
cparse.o: $(RUBY_EXTCONF_H)
cparse.o: $(arch_hdrdir)/ruby/config.h
cparse.o: $(hdrdir)/ruby.h
+cparse.o: $(hdrdir)/ruby/assert.h
+cparse.o: $(hdrdir)/ruby/backward.h
+cparse.o: $(hdrdir)/ruby/backward/2/assume.h
+cparse.o: $(hdrdir)/ruby/backward/2/attributes.h
+cparse.o: $(hdrdir)/ruby/backward/2/bool.h
+cparse.o: $(hdrdir)/ruby/backward/2/inttypes.h
+cparse.o: $(hdrdir)/ruby/backward/2/limits.h
+cparse.o: $(hdrdir)/ruby/backward/2/long_long.h
+cparse.o: $(hdrdir)/ruby/backward/2/stdalign.h
+cparse.o: $(hdrdir)/ruby/backward/2/stdarg.h
+cparse.o: $(hdrdir)/ruby/defines.h
+cparse.o: $(hdrdir)/ruby/intern.h
cparse.o: $(hdrdir)/ruby/internal/anyargs.h
cparse.o: $(hdrdir)/ruby/internal/arithmetic.h
cparse.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ cparse.o: $(hdrdir)/ruby/internal/value_type.h
cparse.o: $(hdrdir)/ruby/internal/variable.h
cparse.o: $(hdrdir)/ruby/internal/warning_push.h
cparse.o: $(hdrdir)/ruby/internal/xmalloc.h
-cparse.o: $(hdrdir)/ruby/assert.h
-cparse.o: $(hdrdir)/ruby/backward.h
-cparse.o: $(hdrdir)/ruby/backward/2/assume.h
-cparse.o: $(hdrdir)/ruby/backward/2/attributes.h
-cparse.o: $(hdrdir)/ruby/backward/2/bool.h
-cparse.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-cparse.o: $(hdrdir)/ruby/backward/2/inttypes.h
-cparse.o: $(hdrdir)/ruby/backward/2/limits.h
-cparse.o: $(hdrdir)/ruby/backward/2/long_long.h
-cparse.o: $(hdrdir)/ruby/backward/2/stdalign.h
-cparse.o: $(hdrdir)/ruby/backward/2/stdarg.h
-cparse.o: $(hdrdir)/ruby/defines.h
-cparse.o: $(hdrdir)/ruby/intern.h
cparse.o: $(hdrdir)/ruby/missing.h
cparse.o: $(hdrdir)/ruby/ruby.h
cparse.o: $(hdrdir)/ruby/st.h
diff --git a/ext/rbconfig/sizeof/depend b/ext/rbconfig/sizeof/depend
index b1774d6c627..c4100266f70 100644
--- a/ext/rbconfig/sizeof/depend
+++ b/ext/rbconfig/sizeof/depend
@@ -16,6 +16,18 @@ sizes.c: $(top_srcdir)/tool/generic_erb.rb \
# AUTOGENERATED DEPENDENCIES START
limits.o: $(RUBY_EXTCONF_H)
limits.o: $(arch_hdrdir)/ruby/config.h
+limits.o: $(hdrdir)/ruby/assert.h
+limits.o: $(hdrdir)/ruby/backward.h
+limits.o: $(hdrdir)/ruby/backward/2/assume.h
+limits.o: $(hdrdir)/ruby/backward/2/attributes.h
+limits.o: $(hdrdir)/ruby/backward/2/bool.h
+limits.o: $(hdrdir)/ruby/backward/2/inttypes.h
+limits.o: $(hdrdir)/ruby/backward/2/limits.h
+limits.o: $(hdrdir)/ruby/backward/2/long_long.h
+limits.o: $(hdrdir)/ruby/backward/2/stdalign.h
+limits.o: $(hdrdir)/ruby/backward/2/stdarg.h
+limits.o: $(hdrdir)/ruby/defines.h
+limits.o: $(hdrdir)/ruby/intern.h
limits.o: $(hdrdir)/ruby/internal/anyargs.h
limits.o: $(hdrdir)/ruby/internal/arithmetic.h
limits.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -155,19 +167,6 @@ limits.o: $(hdrdir)/ruby/internal/value_type.h
limits.o: $(hdrdir)/ruby/internal/variable.h
limits.o: $(hdrdir)/ruby/internal/warning_push.h
limits.o: $(hdrdir)/ruby/internal/xmalloc.h
-limits.o: $(hdrdir)/ruby/assert.h
-limits.o: $(hdrdir)/ruby/backward.h
-limits.o: $(hdrdir)/ruby/backward/2/assume.h
-limits.o: $(hdrdir)/ruby/backward/2/attributes.h
-limits.o: $(hdrdir)/ruby/backward/2/bool.h
-limits.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-limits.o: $(hdrdir)/ruby/backward/2/inttypes.h
-limits.o: $(hdrdir)/ruby/backward/2/limits.h
-limits.o: $(hdrdir)/ruby/backward/2/long_long.h
-limits.o: $(hdrdir)/ruby/backward/2/stdalign.h
-limits.o: $(hdrdir)/ruby/backward/2/stdarg.h
-limits.o: $(hdrdir)/ruby/defines.h
-limits.o: $(hdrdir)/ruby/intern.h
limits.o: $(hdrdir)/ruby/missing.h
limits.o: $(hdrdir)/ruby/ruby.h
limits.o: $(hdrdir)/ruby/st.h
@@ -175,6 +174,18 @@ limits.o: $(hdrdir)/ruby/subst.h
limits.o: limits.c
sizes.o: $(RUBY_EXTCONF_H)
sizes.o: $(arch_hdrdir)/ruby/config.h
+sizes.o: $(hdrdir)/ruby/assert.h
+sizes.o: $(hdrdir)/ruby/backward.h
+sizes.o: $(hdrdir)/ruby/backward/2/assume.h
+sizes.o: $(hdrdir)/ruby/backward/2/attributes.h
+sizes.o: $(hdrdir)/ruby/backward/2/bool.h
+sizes.o: $(hdrdir)/ruby/backward/2/inttypes.h
+sizes.o: $(hdrdir)/ruby/backward/2/limits.h
+sizes.o: $(hdrdir)/ruby/backward/2/long_long.h
+sizes.o: $(hdrdir)/ruby/backward/2/stdalign.h
+sizes.o: $(hdrdir)/ruby/backward/2/stdarg.h
+sizes.o: $(hdrdir)/ruby/defines.h
+sizes.o: $(hdrdir)/ruby/intern.h
sizes.o: $(hdrdir)/ruby/internal/anyargs.h
sizes.o: $(hdrdir)/ruby/internal/arithmetic.h
sizes.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -314,19 +325,6 @@ sizes.o: $(hdrdir)/ruby/internal/value_type.h
sizes.o: $(hdrdir)/ruby/internal/variable.h
sizes.o: $(hdrdir)/ruby/internal/warning_push.h
sizes.o: $(hdrdir)/ruby/internal/xmalloc.h
-sizes.o: $(hdrdir)/ruby/assert.h
-sizes.o: $(hdrdir)/ruby/backward.h
-sizes.o: $(hdrdir)/ruby/backward/2/assume.h
-sizes.o: $(hdrdir)/ruby/backward/2/attributes.h
-sizes.o: $(hdrdir)/ruby/backward/2/bool.h
-sizes.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-sizes.o: $(hdrdir)/ruby/backward/2/inttypes.h
-sizes.o: $(hdrdir)/ruby/backward/2/limits.h
-sizes.o: $(hdrdir)/ruby/backward/2/long_long.h
-sizes.o: $(hdrdir)/ruby/backward/2/stdalign.h
-sizes.o: $(hdrdir)/ruby/backward/2/stdarg.h
-sizes.o: $(hdrdir)/ruby/defines.h
-sizes.o: $(hdrdir)/ruby/intern.h
sizes.o: $(hdrdir)/ruby/missing.h
sizes.o: $(hdrdir)/ruby/ruby.h
sizes.o: $(hdrdir)/ruby/st.h
diff --git a/ext/readline/depend b/ext/readline/depend
index a95a9dc8bb1..818770b8036 100644
--- a/ext/readline/depend
+++ b/ext/readline/depend
@@ -6,7 +6,6 @@ readline.o: $(hdrdir)/ruby/backward.h
readline.o: $(hdrdir)/ruby/backward/2/assume.h
readline.o: $(hdrdir)/ruby/backward/2/attributes.h
readline.o: $(hdrdir)/ruby/backward/2/bool.h
-readline.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
readline.o: $(hdrdir)/ruby/backward/2/inttypes.h
readline.o: $(hdrdir)/ruby/backward/2/limits.h
readline.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/readline/readline-ext.gemspec b/ext/readline/readline-ext.gemspec
index aa03ef2ccb4..177ee2152ef 100644
--- a/ext/readline/readline-ext.gemspec
+++ b/ext/readline/readline-ext.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |spec|
spec.name = "readline-ext"
- spec.version = "0.1.3"
+ spec.version = "0.1.4"
spec.authors = ["Yukihiro Matsumoto"]
spec.email = ["matz@ruby-lang.org"]
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 8d635fce89e..5ae037dd41c 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -696,7 +696,6 @@ str_subpos(const char *ptr, const char *end, long beg, long *sublen, rb_encoding
VALUE str = rb_enc_str_new_static(ptr, end-ptr, enc);
OBJ_FREEZE(str);
ptr = rb_str_subpos(str, beg, sublen);
- rb_gc_force_recycle(str);
return ptr;
}
diff --git a/ext/ripper/depend b/ext/ripper/depend
index 6513ab107f1..9f4b1b53b4f 100644
--- a/ext/ripper/depend
+++ b/ext/ripper/depend
@@ -51,7 +51,6 @@ ripper.E: ripper.c
# AUTOGENERATED DEPENDENCIES START
ripper.o: $(RUBY_EXTCONF_H)
ripper.o: $(arch_hdrdir)/ruby/config.h
-ripper.o: $(hdrdir)/ruby.h
ripper.o: $(hdrdir)/ruby/assert.h
ripper.o: $(hdrdir)/ruby/backward.h
ripper.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -248,7 +247,6 @@ ripper.o: $(top_srcdir)/internal/static_assert.h
ripper.o: $(top_srcdir)/internal/string.h
ripper.o: $(top_srcdir)/internal/symbol.h
ripper.o: $(top_srcdir)/internal/thread.h
-ripper.o: $(top_srcdir)/internal/util.h
ripper.o: $(top_srcdir)/internal/variable.h
ripper.o: $(top_srcdir)/internal/vm.h
ripper.o: $(top_srcdir)/internal/warnings.h
diff --git a/ext/ripper/extconf.rb b/ext/ripper/extconf.rb
index 2dde565bd97..65cb5030d3d 100644
--- a/ext/ripper/extconf.rb
+++ b/ext/ripper/extconf.rb
@@ -13,7 +13,8 @@ def main
end
end
$objs = %w(ripper.o)
- $cleanfiles.concat %w(ripper.y ripper.c ripper.E ripper.output y.output eventids1.c eventids2table.c .eventids2-check)
+ $distcleanfiles.concat %w(ripper.y ripper.c eventids1.c eventids2table.c)
+ $cleanfiles.concat %w(ripper.E ripper.output y.output .eventids2-check)
$defs << '-DRIPPER'
$defs << '-DRIPPER_DEBUG' if $debug
$VPATH << '$(topdir)' << '$(top_srcdir)'
diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb
index f6051c63416..19c59e2cccf 100644
--- a/ext/ripper/lib/ripper/lexer.rb
+++ b/ext/ripper/lib/ripper/lexer.rb
@@ -53,10 +53,27 @@ class Ripper
end
class Lexer < ::Ripper #:nodoc: internal use only
- State = Struct.new(:to_int, :to_s) do
+ class State
+ attr_reader :to_int, :to_s
+
+ def initialize(i)
+ @to_int = i
+ @to_s = Ripper.lex_state_name(i)
+ freeze
+ end
+
+ def [](index)
+ case index
+ when 0, :to_int
+ @to_int
+ when 1, :to_s
+ @event
+ else
+ nil
+ end
+ end
+
alias to_i to_int
- def initialize(i) super(i, Ripper.lex_state_name(i)).freeze end
- # def inspect; "#<#{self.class}: #{self}>" end
alias inspect to_s
def pretty_print(q) q.text(to_s) end
def ==(i) super or to_int == i end
@@ -67,15 +84,40 @@ class Ripper
def nobits?(i) to_int.nobits?(i) end
end
- Elem = Struct.new(:pos, :event, :tok, :state, :message) do
+ class Elem
+ attr_accessor :pos, :event, :tok, :state, :message
+
def initialize(pos, event, tok, state, message = nil)
- super(pos, event, tok, State.new(state), message)
+ @pos = pos
+ @event = event
+ @tok = tok
+ @state = State.new(state)
+ @message = message
+ end
+
+ def [](index)
+ case index
+ when 0, :pos
+ @pos
+ when 1, :event
+ @event
+ when 2, :tok
+ @tok
+ when 3, :state
+ @state
+ when 4, :message
+ @message
+ else
+ nil
+ end
end
def inspect
"#<#{self.class}: #{event}@#{pos[0]}:#{pos[1]}:#{state}: #{tok.inspect}#{": " if message}#{message}>"
end
+ alias to_s inspect
+
def pretty_print(q)
q.group(2, "#<#{self.class}:", ">") {
q.breakable
@@ -94,9 +136,11 @@ class Ripper
end
def to_a
- a = super
- a.pop unless a.last
- a
+ if @message
+ [@pos, @event, @tok, @state, @message]
+ else
+ [@pos, @event, @tok, @state]
+ end
end
end
@@ -152,17 +196,19 @@ class Ripper
def on_heredoc_dedent(v, w)
ignored_sp = []
heredoc = @buf.last
- heredoc.each_with_index do |e, i|
- if Elem === e and e.event == :on_tstring_content and e.pos[1].zero?
- tok = e.tok.dup if w > 0 and /\A\s/ =~ e.tok
- if (n = dedent_string(e.tok, w)) > 0
- if e.tok.empty?
- e.tok = tok[0, n]
- e.event = :on_ignored_sp
- next
+ if Array === heredoc
+ heredoc.each_with_index do |e, i|
+ if Elem === e and e.event == :on_tstring_content and e.pos[1].zero?
+ tok = e.tok.dup if w > 0 and /\A\s/ =~ e.tok
+ if (n = dedent_string(e.tok, w)) > 0
+ if e.tok.empty?
+ e.tok = tok[0, n]
+ e.event = :on_ignored_sp
+ next
+ end
+ ignored_sp << [i, Elem.new(e.pos.dup, :on_ignored_sp, tok[0, n], e.state)]
+ e.pos[1] += n
end
- ignored_sp << [i, Elem.new(e.pos.dup, :on_ignored_sp, tok[0, n], e.state)]
- e.pos[1] += n
end
end
end
diff --git a/ext/socket/depend b/ext/socket/depend
index f2d7a67bcb8..99617e2532e 100644
--- a/ext/socket/depend
+++ b/ext/socket/depend
@@ -12,7 +12,6 @@ constdefs.c: constdefs.h
# AUTOGENERATED DEPENDENCIES START
ancdata.o: $(RUBY_EXTCONF_H)
ancdata.o: $(arch_hdrdir)/ruby/config.h
-ancdata.o: $(hdrdir)/ruby.h
ancdata.o: $(hdrdir)/ruby/assert.h
ancdata.o: $(hdrdir)/ruby/backward.h
ancdata.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -203,7 +202,6 @@ ancdata.o: rubysocket.h
ancdata.o: sockport.h
basicsocket.o: $(RUBY_EXTCONF_H)
basicsocket.o: $(arch_hdrdir)/ruby/config.h
-basicsocket.o: $(hdrdir)/ruby.h
basicsocket.o: $(hdrdir)/ruby/assert.h
basicsocket.o: $(hdrdir)/ruby/backward.h
basicsocket.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -394,7 +392,6 @@ basicsocket.o: rubysocket.h
basicsocket.o: sockport.h
constants.o: $(RUBY_EXTCONF_H)
constants.o: $(arch_hdrdir)/ruby/config.h
-constants.o: $(hdrdir)/ruby.h
constants.o: $(hdrdir)/ruby/assert.h
constants.o: $(hdrdir)/ruby/backward.h
constants.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -586,7 +583,6 @@ constants.o: rubysocket.h
constants.o: sockport.h
ifaddr.o: $(RUBY_EXTCONF_H)
ifaddr.o: $(arch_hdrdir)/ruby/config.h
-ifaddr.o: $(hdrdir)/ruby.h
ifaddr.o: $(hdrdir)/ruby/assert.h
ifaddr.o: $(hdrdir)/ruby/backward.h
ifaddr.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -777,7 +773,6 @@ ifaddr.o: rubysocket.h
ifaddr.o: sockport.h
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
-init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
init.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -968,7 +963,6 @@ init.o: rubysocket.h
init.o: sockport.h
ipsocket.o: $(RUBY_EXTCONF_H)
ipsocket.o: $(arch_hdrdir)/ruby/config.h
-ipsocket.o: $(hdrdir)/ruby.h
ipsocket.o: $(hdrdir)/ruby/assert.h
ipsocket.o: $(hdrdir)/ruby/backward.h
ipsocket.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -1159,7 +1153,6 @@ ipsocket.o: rubysocket.h
ipsocket.o: sockport.h
option.o: $(RUBY_EXTCONF_H)
option.o: $(arch_hdrdir)/ruby/config.h
-option.o: $(hdrdir)/ruby.h
option.o: $(hdrdir)/ruby/assert.h
option.o: $(hdrdir)/ruby/backward.h
option.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -1350,7 +1343,6 @@ option.o: rubysocket.h
option.o: sockport.h
raddrinfo.o: $(RUBY_EXTCONF_H)
raddrinfo.o: $(arch_hdrdir)/ruby/config.h
-raddrinfo.o: $(hdrdir)/ruby.h
raddrinfo.o: $(hdrdir)/ruby/assert.h
raddrinfo.o: $(hdrdir)/ruby/backward.h
raddrinfo.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -1541,7 +1533,6 @@ raddrinfo.o: rubysocket.h
raddrinfo.o: sockport.h
socket.o: $(RUBY_EXTCONF_H)
socket.o: $(arch_hdrdir)/ruby/config.h
-socket.o: $(hdrdir)/ruby.h
socket.o: $(hdrdir)/ruby/assert.h
socket.o: $(hdrdir)/ruby/backward.h
socket.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -1732,7 +1723,6 @@ socket.o: socket.c
socket.o: sockport.h
sockssocket.o: $(RUBY_EXTCONF_H)
sockssocket.o: $(arch_hdrdir)/ruby/config.h
-sockssocket.o: $(hdrdir)/ruby.h
sockssocket.o: $(hdrdir)/ruby/assert.h
sockssocket.o: $(hdrdir)/ruby/backward.h
sockssocket.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -1923,7 +1913,6 @@ sockssocket.o: sockport.h
sockssocket.o: sockssocket.c
tcpserver.o: $(RUBY_EXTCONF_H)
tcpserver.o: $(arch_hdrdir)/ruby/config.h
-tcpserver.o: $(hdrdir)/ruby.h
tcpserver.o: $(hdrdir)/ruby/assert.h
tcpserver.o: $(hdrdir)/ruby/backward.h
tcpserver.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -2114,7 +2103,6 @@ tcpserver.o: sockport.h
tcpserver.o: tcpserver.c
tcpsocket.o: $(RUBY_EXTCONF_H)
tcpsocket.o: $(arch_hdrdir)/ruby/config.h
-tcpsocket.o: $(hdrdir)/ruby.h
tcpsocket.o: $(hdrdir)/ruby/assert.h
tcpsocket.o: $(hdrdir)/ruby/backward.h
tcpsocket.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -2305,7 +2293,6 @@ tcpsocket.o: sockport.h
tcpsocket.o: tcpsocket.c
udpsocket.o: $(RUBY_EXTCONF_H)
udpsocket.o: $(arch_hdrdir)/ruby/config.h
-udpsocket.o: $(hdrdir)/ruby.h
udpsocket.o: $(hdrdir)/ruby/assert.h
udpsocket.o: $(hdrdir)/ruby/backward.h
udpsocket.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -2496,7 +2483,6 @@ udpsocket.o: sockport.h
udpsocket.o: udpsocket.c
unixserver.o: $(RUBY_EXTCONF_H)
unixserver.o: $(arch_hdrdir)/ruby/config.h
-unixserver.o: $(hdrdir)/ruby.h
unixserver.o: $(hdrdir)/ruby/assert.h
unixserver.o: $(hdrdir)/ruby/backward.h
unixserver.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -2687,7 +2673,6 @@ unixserver.o: sockport.h
unixserver.o: unixserver.c
unixsocket.o: $(RUBY_EXTCONF_H)
unixsocket.o: $(arch_hdrdir)/ruby/config.h
-unixsocket.o: $(hdrdir)/ruby.h
unixsocket.o: $(hdrdir)/ruby/assert.h
unixsocket.o: $(hdrdir)/ruby/backward.h
unixsocket.o: $(hdrdir)/ruby/backward/2/assume.h
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index c86cc8f8c03..b70a8624149 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -484,6 +484,9 @@ EOF
have_func("getpeerucred(0, (ucred_t **)NULL)", headers) # SunOS
have_func_decl = proc do |name, headers|
+ # check if there is a declaration of <name> by trying to declare
+ # both "int <name>(void)" and "void <name>(void)"
+ # (at least one attempt should fail if there is a declaration)
if !checking_for("declaration of #{name}()") {!%w[int void].all? {|ret| try_compile(<<EOF)}}
#{cpp_include(headers)}
#{ret} #{name}(void);
@@ -492,10 +495,10 @@ EOF
end
end
if have_func('if_indextoname(0, "")', headers)
- have_func_decl["if_indextoname"]
+ have_func_decl["if_indextoname", headers]
end
if have_func('if_nametoindex("")', headers)
- have_func_decl["if_nametoindex"]
+ have_func_decl["if_nametoindex", headers]
end
have_func("hsterror", headers)
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index ccf990d11fb..4ba1c6cd61e 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -1529,7 +1529,7 @@ rsock_sockaddr_obj(struct sockaddr *addr, socklen_t len)
#endif
-#if defined(HAVE_GETIFADDRS) || (defined(SIOCGLIFCONF) && defined(SIOCGLIFNUM) && !defined(__hpux)) || defined(SIOCGIFCONF) || defined(_WIN32)
+#if defined(HAVE_GETIFADDRS) || (defined(SIOCGLIFCONF) && defined(SIOCGLIFNUM)) || defined(SIOCGIFCONF) || defined(_WIN32)
/*
* call-seq:
* Socket.ip_address_list => array
@@ -1590,9 +1590,8 @@ socket_s_ip_address_list(VALUE self)
freeifaddrs(ifp);
return list;
-#elif defined(SIOCGLIFCONF) && defined(SIOCGLIFNUM) && !defined(__hpux)
+#elif defined(SIOCGLIFCONF) && defined(SIOCGLIFNUM)
/* Solaris if_tcp(7P) */
- /* HP-UX has SIOCGLIFCONF too. But it uses different struct */
int fd = -1;
int ret;
struct lifnum ln;
diff --git a/ext/stringio/depend b/ext/stringio/depend
index da20efe1315..7b70a77d202 100644
--- a/ext/stringio/depend
+++ b/ext/stringio/depend
@@ -7,7 +7,6 @@ stringio.o: $(hdrdir)/ruby/backward.h
stringio.o: $(hdrdir)/ruby/backward/2/assume.h
stringio.o: $(hdrdir)/ruby/backward/2/attributes.h
stringio.o: $(hdrdir)/ruby/backward/2/bool.h
-stringio.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
stringio.o: $(hdrdir)/ruby/backward/2/inttypes.h
stringio.o: $(hdrdir)/ruby/backward/2/limits.h
stringio.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/strscan/depend b/ext/strscan/depend
index 5605a72359c..7024f8bfaa6 100644
--- a/ext/strscan/depend
+++ b/ext/strscan/depend
@@ -6,7 +6,6 @@ strscan.o: $(hdrdir)/ruby/backward.h
strscan.o: $(hdrdir)/ruby/backward/2/assume.h
strscan.o: $(hdrdir)/ruby/backward/2/attributes.h
strscan.o: $(hdrdir)/ruby/backward/2/bool.h
-strscan.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
strscan.o: $(hdrdir)/ruby/backward/2/inttypes.h
strscan.o: $(hdrdir)/ruby/backward/2/limits.h
strscan.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/syslog/depend b/ext/syslog/depend
index fb98401e525..0752bed04d1 100644
--- a/ext/syslog/depend
+++ b/ext/syslog/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
syslog.o: $(RUBY_EXTCONF_H)
syslog.o: $(arch_hdrdir)/ruby/config.h
+syslog.o: $(hdrdir)/ruby/assert.h
+syslog.o: $(hdrdir)/ruby/backward.h
+syslog.o: $(hdrdir)/ruby/backward/2/assume.h
+syslog.o: $(hdrdir)/ruby/backward/2/attributes.h
+syslog.o: $(hdrdir)/ruby/backward/2/bool.h
+syslog.o: $(hdrdir)/ruby/backward/2/inttypes.h
+syslog.o: $(hdrdir)/ruby/backward/2/limits.h
+syslog.o: $(hdrdir)/ruby/backward/2/long_long.h
+syslog.o: $(hdrdir)/ruby/backward/2/stdalign.h
+syslog.o: $(hdrdir)/ruby/backward/2/stdarg.h
+syslog.o: $(hdrdir)/ruby/defines.h
+syslog.o: $(hdrdir)/ruby/intern.h
syslog.o: $(hdrdir)/ruby/internal/anyargs.h
syslog.o: $(hdrdir)/ruby/internal/arithmetic.h
syslog.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ syslog.o: $(hdrdir)/ruby/internal/value_type.h
syslog.o: $(hdrdir)/ruby/internal/variable.h
syslog.o: $(hdrdir)/ruby/internal/warning_push.h
syslog.o: $(hdrdir)/ruby/internal/xmalloc.h
-syslog.o: $(hdrdir)/ruby/assert.h
-syslog.o: $(hdrdir)/ruby/backward.h
-syslog.o: $(hdrdir)/ruby/backward/2/assume.h
-syslog.o: $(hdrdir)/ruby/backward/2/attributes.h
-syslog.o: $(hdrdir)/ruby/backward/2/bool.h
-syslog.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-syslog.o: $(hdrdir)/ruby/backward/2/inttypes.h
-syslog.o: $(hdrdir)/ruby/backward/2/limits.h
-syslog.o: $(hdrdir)/ruby/backward/2/long_long.h
-syslog.o: $(hdrdir)/ruby/backward/2/stdalign.h
-syslog.o: $(hdrdir)/ruby/backward/2/stdarg.h
-syslog.o: $(hdrdir)/ruby/defines.h
-syslog.o: $(hdrdir)/ruby/intern.h
syslog.o: $(hdrdir)/ruby/missing.h
syslog.o: $(hdrdir)/ruby/ruby.h
syslog.o: $(hdrdir)/ruby/st.h
diff --git a/ext/win32ole/win32ole.gemspec b/ext/win32ole/win32ole.gemspec
index 021625e44e9..977555c98df 100644
--- a/ext/win32ole/win32ole.gemspec
+++ b/ext/win32ole/win32ole.gemspec
@@ -8,6 +8,7 @@ Gem::Specification.new do |spec|
spec.description = spec.summary
spec.homepage = "https://github.com/ruby/win32ole"
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
diff --git a/ext/win32ole/win32ole_method.c b/ext/win32ole/win32ole_method.c
index bf668300c24..6ed5def6d77 100644
--- a/ext/win32ole/win32ole_method.c
+++ b/ext/win32ole/win32ole_method.c
@@ -437,7 +437,7 @@ ole_method_invoke_kind(ITypeInfo *pTypeInfo, UINT method_index)
/*
* call-seq:
- * WIN32OLE_MTHOD#invkind
+ * WIN32OLE_METHOD#invkind
*
* Returns the method invoke kind.
* tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
diff --git a/ext/win32ole/win32ole_variable.c b/ext/win32ole/win32ole_variable.c
index 803083156c8..8d80455d976 100644
--- a/ext/win32ole/win32ole_variable.c
+++ b/ext/win32ole/win32ole_variable.c
@@ -370,6 +370,7 @@ VALUE cWIN32OLE_VARIABLE;
void Init_win32ole_variable(void)
{
cWIN32OLE_VARIABLE = rb_define_class("WIN32OLE_VARIABLE", rb_cObject);
+ rb_undef_alloc_func(cWIN32OLE_VARIABLE);
rb_define_method(cWIN32OLE_VARIABLE, "name", folevariable_name, 0);
rb_define_method(cWIN32OLE_VARIABLE, "ole_type", folevariable_ole_type, 0);
rb_define_method(cWIN32OLE_VARIABLE, "ole_type_detail", folevariable_ole_type_detail, 0);
diff --git a/ext/zlib/depend b/ext/zlib/depend
index d63d388c9e7..68c1efde04d 100644
--- a/ext/zlib/depend
+++ b/ext/zlib/depend
@@ -7,7 +7,6 @@ zlib.o: $(hdrdir)/ruby/backward.h
zlib.o: $(hdrdir)/ruby/backward/2/assume.h
zlib.o: $(hdrdir)/ruby/backward/2/attributes.h
zlib.o: $(hdrdir)/ruby/backward/2/bool.h
-zlib.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
zlib.o: $(hdrdir)/ruby/backward/2/inttypes.h
zlib.o: $(hdrdir)/ruby/backward/2/limits.h
zlib.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/zlib/extlibs b/ext/zlib/extlibs
deleted file mode 100644
index a64b37ba5f1..00000000000
--- a/ext/zlib/extlibs
+++ /dev/null
@@ -1,8 +0,0 @@
-ver = 1.2.11
-pkg = zlib-$(ver)
-
-https://zlib.net/$(pkg).tar.gz \
- md5:1c9f62f0778697a09d36121ead88e08e \
- sha512:73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae \
- #
- win32/$(pkg)-mswin.patch -p0
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 9937f827402..be5f148bcd9 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -288,6 +288,7 @@ static VALUE rb_gzreader_readlines(int, VALUE*, VALUE);
* - Zlib::MemError
* - Zlib::BufError
* - Zlib::VersionError
+ * - Zlib::InProgressError
*
* (if you have GZIP_SUPPORT)
* - Zlib::GzipReader
@@ -304,7 +305,7 @@ void Init_zlib(void);
/*--------- Exceptions --------*/
static VALUE cZError, cStreamEnd, cNeedDict;
-static VALUE cStreamError, cDataError, cMemError, cBufError, cVersionError;
+static VALUE cStreamError, cDataError, cMemError, cBufError, cVersionError, cInProgressError;
static void
raise_zlib_error(int err, const char *msg)
@@ -557,14 +558,15 @@ struct zstream {
} *func;
};
-#define ZSTREAM_FLAG_READY 0x1
-#define ZSTREAM_FLAG_IN_STREAM 0x2
-#define ZSTREAM_FLAG_FINISHED 0x4
-#define ZSTREAM_FLAG_CLOSING 0x8
-#define ZSTREAM_FLAG_GZFILE 0x10 /* disallows yield from expand_buffer for
+#define ZSTREAM_FLAG_READY (1 << 0)
+#define ZSTREAM_FLAG_IN_STREAM (1 << 1)
+#define ZSTREAM_FLAG_FINISHED (1 << 2)
+#define ZSTREAM_FLAG_CLOSING (1 << 3)
+#define ZSTREAM_FLAG_GZFILE (1 << 4) /* disallows yield from expand_buffer for
gzip*/
-#define ZSTREAM_REUSE_BUFFER 0x20
-#define ZSTREAM_FLAG_UNUSED 0x40
+#define ZSTREAM_REUSE_BUFFER (1 << 5)
+#define ZSTREAM_IN_PROGRESS (1 << 6)
+#define ZSTREAM_FLAG_UNUSED (1 << 7)
#define ZSTREAM_READY(z) ((z)->flags |= ZSTREAM_FLAG_READY)
#define ZSTREAM_IS_READY(z) ((z)->flags & ZSTREAM_FLAG_READY)
@@ -593,7 +595,9 @@ static const struct zstream_funcs inflate_funcs = {
};
struct zstream_run_args {
- struct zstream * z;
+ struct zstream *const z;
+ Bytef *src;
+ long len;
int flush; /* stream flush value for inflate() or deflate() */
int interrupt; /* stop processing the stream and return to ruby */
int jump_state; /* for buffer expansion block break or exception */
@@ -894,7 +898,6 @@ zstream_discard_input(struct zstream *z, long len)
}
rb_str_resize(z->input, newlen);
if (newlen == 0) {
- rb_gc_force_recycle(z->input);
z->input = Qnil;
}
else {
@@ -1059,19 +1062,18 @@ zstream_unblock_func(void *ptr)
args->interrupt = 1;
}
-static void
-zstream_run0(struct zstream *z, Bytef *src, long len, int flush)
+static VALUE
+zstream_run_try(VALUE value_arg)
{
- struct zstream_run_args args;
+ struct zstream_run_args *args = (struct zstream_run_args *)value_arg;
+ struct zstream *z = args->z;
+ Bytef *src = args->src;
+ long len = args->len;
+ int flush = args->flush;
+
int err;
VALUE old_input = Qnil;
- args.z = z;
- args.flush = flush;
- args.interrupt = 0;
- args.jump_state = 0;
- args.stream_output = !ZSTREAM_IS_GZFILE(z) && rb_block_given_p();
-
if (NIL_P(z->input) && len == 0) {
z->stream.next_in = (Bytef*)"";
z->stream.avail_in = 0;
@@ -1093,17 +1095,17 @@ zstream_run0(struct zstream *z, Bytef *src, long len, int flush)
loop:
#ifndef RB_NOGVL_UBF_ASYNC_SAFE
- err = (int)(VALUE)rb_thread_call_without_gvl(zstream_run_func, (void *)&args,
- zstream_unblock_func, (void *)&args);
+ err = (int)(VALUE)rb_thread_call_without_gvl(zstream_run_func, (void *)args,
+ zstream_unblock_func, (void *)args);
#else
- err = (int)(VALUE)rb_nogvl(zstream_run_func, (void *)&args,
- zstream_unblock_func, (void *)&args,
+ err = (int)(VALUE)rb_nogvl(zstream_run_func, (void *)args,
+ zstream_unblock_func, (void *)args,
RB_NOGVL_UBF_ASYNC_SAFE);
#endif
/* retry if no exception is thrown */
- if (err == Z_OK && args.interrupt) {
- args.interrupt = 0;
+ if (err == Z_OK && args->interrupt) {
+ args->interrupt = 0;
goto loop;
}
@@ -1137,37 +1139,54 @@ loop:
}
if (!NIL_P(old_input)) {
rb_str_resize(old_input, 0);
- rb_gc_force_recycle(old_input);
}
- if (args.jump_state)
- rb_jump_tag(args.jump_state);
+ if (args->jump_state)
+ rb_jump_tag(args->jump_state);
+
+ return Qnil;
}
-struct zstream_run_synchronized_args {
- struct zstream *z;
- Bytef *src;
- long len;
- int flush;
-};
+static VALUE
+zstream_run_ensure(VALUE value_arg)
+{
+ struct zstream_run_args *args = (struct zstream_run_args *)value_arg;
+
+ /* Remove ZSTREAM_IN_PROGRESS flag to signal that this zstream is not in use. */
+ args->z->flags &= ~ZSTREAM_IN_PROGRESS;
+
+ return Qnil;
+}
static VALUE
zstream_run_synchronized(VALUE value_arg)
{
- struct zstream_run_synchronized_args *run_args = (struct zstream_run_synchronized_args *)value_arg;
- zstream_run0(run_args->z, run_args->src, run_args->len, run_args->flush);
+ struct zstream_run_args *args = (struct zstream_run_args *)value_arg;
+
+ /* Cannot start zstream while it is in progress. */
+ if (args->z->flags & ZSTREAM_IN_PROGRESS) {
+ rb_raise(cInProgressError, "zlib stream is in progress");
+ }
+ args->z->flags |= ZSTREAM_IN_PROGRESS;
+
+ rb_ensure(zstream_run_try, value_arg, zstream_run_ensure, value_arg);
+
return Qnil;
}
static void
zstream_run(struct zstream *z, Bytef *src, long len, int flush)
{
- struct zstream_run_synchronized_args run_args;
- run_args.z = z;
- run_args.src = src;
- run_args.len = len;
- run_args.flush = flush;
- rb_mutex_synchronize(z->mutex, zstream_run_synchronized, (VALUE)&run_args);
+ struct zstream_run_args args = {
+ .z = z,
+ .src = src,
+ .len = len,
+ .flush = flush,
+ .interrupt = 0,
+ .jump_state = 0,
+ .stream_output = !ZSTREAM_IS_GZFILE(z) && rb_block_given_p(),
+ };
+ rb_mutex_synchronize(z->mutex, zstream_run_synchronized, (VALUE)&args);
}
static VALUE
@@ -2906,8 +2925,6 @@ gzfile_readpartial(struct gzfile *gz, long len, VALUE outbuf)
if (!NIL_P(outbuf)) {
rb_str_resize(outbuf, RSTRING_LEN(dst));
memcpy(RSTRING_PTR(outbuf), RSTRING_PTR(dst), RSTRING_LEN(dst));
- rb_str_resize(dst, 0);
- rb_gc_force_recycle(dst);
dst = outbuf;
}
return dst;
@@ -4619,6 +4636,7 @@ Init_zlib(void)
cMemError = rb_define_class_under(mZlib, "MemError", cZError);
cBufError = rb_define_class_under(mZlib, "BufError", cZError);
cVersionError = rb_define_class_under(mZlib, "VersionError", cZError);
+ cInProgressError = rb_define_class_under(mZlib, "InProgressError", cZError);
rb_define_module_function(mZlib, "zlib_version", rb_zlib_version, 0);
rb_define_module_function(mZlib, "adler32", rb_zlib_adler32, -1);
@@ -4926,6 +4944,7 @@ Init_zlib(void)
* - Zlib::MemError
* - Zlib::BufError
* - Zlib::VersionError
+ * - Zlib::InProgressError
*
*/
@@ -5001,6 +5020,20 @@ Init_zlib(void)
*/
/*
+ * Document-class: Zlib::InProgressError
+ *
+ * Subclass of Zlib::Error. This error is raised when the zlib
+ * stream is currently in progress.
+ *
+ * For example:
+ *
+ * inflater = Zlib::Inflate.new
+ * inflater.inflate(compressed) do
+ * inflater.inflate(compressed) # Raises Zlib::InProgressError
+ * end
+ */
+
+/*
* Document-class: Zlib::GzipFile::Error
*
* Base class of errors that occur when processing GZIP files.