Commit graph

8776 commits

Author SHA1 Message Date
git
8a65cf3b61 * expand tabs. [ci skip]
Tabs were expanded because the file did not have any tab indentation in unedited lines.
Please update your editor config, and use misc/expand_tabs.rb in the pre-commit hook.
2022-07-30 16:41:32 +09:00
Nobuyoshi Nakada
48b09aae7e [ruby/digest] Revert tab-expansion in external files
5ca2b5b91e
2022-07-30 16:41:19 +09:00
Burdette Lamar
53175643ef [ruby/date] [DOC] Enhanced RDoc (https://github.com/ruby/date/pull/66)
Treats:
    #===
    #to_s
    #inspect
    #strftme
    #asctime
    #iso3601
    #rfc3339
    #rfc2822
    #httpdate
    #jisx0301

aed66fedf6
2022-07-30 04:51:10 +09:00
Jean Boussier
66b52f046f [flori/json] Stop including the parser source __LINE__ in exceptions
It makes testing for JSON errors very tedious. You either have
to use a Regexp or to regularly update all your assertions
when JSON is upgraded.

de9eb1d28e
2022-07-29 19:10:10 +09:00
Burdette Lamar
c348f5a91c [ruby/date] [DOC] Enhanced RDoc for <=> (https://github.com/ruby/date/pull/65)
0cdbaa92e9
2022-07-29 06:37:10 +09:00
Nobuyoshi Nakada
64c8291c7e [ruby/pathname] Fix autoload of FileUtils
Should not be `Pathname::FileUtils`.

d1eb366e73
2022-07-27 21:05:10 +09:00
Nobuyoshi Nakada
f42230ff22
Adjust styles [ci skip] 2022-07-27 18:42:27 +09:00
Hiroshi SHIBATA
8154b176de
Manually sync with https://github.com/ruby/date/pull/64 2022-07-27 14:17:19 +09:00
Peter Zhu
efb91ff19b Rename rb_ary_tmp_new to rb_ary_hidden_new
rb_ary_tmp_new suggests that the array is temporary in some way, but
that's not true, it just creates an array that's hidden and not on the
transient heap. This commit renames it to rb_ary_hidden_new.
2022-07-26 09:12:09 -04:00
Ivo Anjo
649bfbe00d Fix rb_profile_frames output includes dummy main thread frame
The `rb_profile_frames` API did not skip the two dummy frames that
each thread has at its beginning. This was unlike `backtrace_each` and
`rb_ec_parcial_backtrace_object`, which do skip them.

This does not seem to be a problem for non-main thread frames,
because both `VM_FRAME_RUBYFRAME_P(cfp)` and
`rb_vm_frame_method_entry(cfp)` are NULL for them.

BUT, on the main thread `VM_FRAME_RUBYFRAME_P(cfp)` was true
and thus the dummy thread was still included in the output of
`rb_profile_frames`.

I've now made `rb_profile_frames` skip this extra frame (like
`backtrace_each` and friends), as well as add a test that asserts
the size and contents of `rb_profile_frames`.

Fixes [Bug #18907] (<https://bugs.ruby-lang.org/issues/18907>)
2022-07-26 10:43:44 +09:00
Nobuyoshi Nakada
6af7212004
Make extensions under Gem.extension_api_version directory 2022-07-24 22:32:07 +09:00
Nobuyoshi Nakada
92c7417d73
Adjust indents [ci skip] 2022-07-22 21:59:27 +09:00
Nobuyoshi Nakada
c6aa65430f
Get rid of magic numbers 2022-07-22 10:41:44 +09:00
Nobuyoshi Nakada
cf7d07570f
Dump non-ASCII char as unsigned
Non-ASCII code may be negative on platforms plain char is signed.
2022-07-22 09:56:48 +09:00
Jean byroot Boussier
f0ae583a3d Revert "objspace_dump.c: skip dumping method name if not pure ASCII"
This reverts commit 79406e3600.
2022-07-21 19:56:08 +02:00
Jean Boussier
79406e3600 objspace_dump.c: skip dumping method name if not pure ASCII
Sidekiq has a method named `❨╯°□°❩╯︵┻━┻`which corrupts
heap dumps.

Normally we could just dump is as is since it's valid UTF-8 and need
no escaping. But our code to escape control characters isn't UTF-8
aware so it's more complicated than it seems.

Ultimately since the overwhelming majority of method names are
pure ASCII, it's not a big loss to just skip it.
2022-07-21 18:43:45 +02:00
Takashi Kokubun
5b21e94beb Expand tabs [ci skip]
[Misc #18891]
2022-07-21 09:42:04 -07:00
Nobuyoshi Nakada
c093e7d645
Avoid to symlink under symlink 2022-07-16 16:38:03 +09:00
Nobuyoshi Nakada
78d2be69b5
Move copying/linking extra files to Makefile so removed by clean 2022-07-16 10:11:42 +09:00
Yuta Saito
ed8c21bbd5 Ensure symlinks to bundled gem with exts have parent dir
When configuring with `--disable-rpath` and `--static-linked-ext` (e.g.
building for WASI), `extmk.rb` doesn't build exts under bundled gems,
and `.bundle/gems/#{gemname}-#{ver}` are not created due to no call of
`extmake`.
b249178398 starts creating symlink at
`.bundle/gems/#{gemname}-#{ver}/lib`, but the parent dir is not created,
so configuration aginst debug and rbs gems were failed.
2022-07-15 13:14:31 +09:00
Karl Anderson
509d0a9299 [ruby/psych] Fix infinite loop bug after YAML_MEMORY_ERROR (psych issue #440)
6c56700fb2
2022-07-15 01:39:42 +09:00
Nobuyoshi Nakada
673759328c [ruby/bigdecimal] Remove checks for struct RRational and struct RComplex
These are used to see only if `RRATIONAL` and `RCOMPLEX` are
available, however, these two are macros and can be checked with
`#ifdef` directly.

175bbacd43
2022-07-14 21:02:02 +09:00
Nobuyoshi Nakada
b249178398 Install gems lib directory to build path 2022-07-14 09:00:13 +09:00
Nobuyoshi Nakada
a2c66f52f4 Make dependency-free gemspec files
The default gems have not been installed yet in the build directory,
bundled gems depending on them can not work.  As those dependencies
should be usable there even without rubygems, make temporary gemspec
files without the dependencies, and use them in the build directory.
2022-07-14 09:00:13 +09:00
Nobuyoshi Nakada
dcbb94d5b9
Move timestamps directory for bundled gems 2022-07-13 00:00:46 +09:00
Burdette Lamar
3aee94fb91 [ruby/date] [DOC] Enhanced RDoc (https://github.com/ruby/date/pull/63)
Treats:
    #next
    #<<
    #>>
    #next_month
    #prev_month
    #next_year
    #prev_year
    #step
    #upto
    #downto

4246441a35
2022-07-12 22:57:25 +09:00
Burdette Lamar
702d4d773f [ruby/date] [DOC] Enhanced RDoc (https://github.com/ruby/date/pull/62)
Minor edits to 11 methods' documentation.

00bb7f6648
2022-07-12 00:02:41 +09:00
Burdette Lamar
5137af633e [ruby/date] Enhanced RDoc (https://github.com/ruby/date/pull/61)
Omit private aliases from Rdoc.

48f9180663
2022-07-10 23:51:41 +09:00
Burdette Lamar
e9ec6893d2 [ruby/date] [DOC] Enhanced RDoc (https://github.com/ruby/date/pull/59)
Minor changes (mostly doc-guide compliance) to 18 or so of simpler methods (getters).

00e37ba2b4
2022-07-09 01:06:08 +09:00
Peter Zhu
86768f1d4c [ruby/openssl] Fix formatting in docs
The + tag can only be used for single words. For multiple words the <tt>
tag has to be used.

cf2f019c3e
2022-07-08 23:18:24 +09:00
Jarek Prokop
4d6a29320d [ruby/openssl] Let OpenSSL choose the digest if digest for Openssl::OCSP::BasicResponse#sign is nil.
27efcd7e1c
2022-07-08 23:18:22 +09:00
Jarek Prokop
7a5a90e053 [ruby/openssl] Let OpenSSL choose the digest if digest for Openssl::OCSP::Request#sign is nil.
a1f6cbc261
2022-07-08 23:18:20 +09:00
Jeremy Evans
b5efef3794 [ruby/openssl] Fix operator precedence in OSSL_OPENSSL_PREREQ and OSSL_LIBRESSL_PREREQ
b02815271f
2022-07-08 23:18:16 +09:00
Jeremy Evans
aee36dd788 [ruby/openssl] Fix build with LibreSSL 3.5
e25fb0d0d8
2022-07-08 23:18:14 +09:00
twkmd12
09daf78fb5 [ruby/openssl] Add 'ciphersuites=' method to allow setting of TLSv1.3 cipher suites along with some unit tests (https://github.com/ruby/openssl/pull/493)
Add OpenSSL::SSL::SSLContext#ciphersuites= method along with unit tests.

12250c7cef
2022-07-08 23:18:11 +09:00
Stefan Kaes
0bf2dfa6ac [ruby/openssl] ignore pkgconfig when any openssl option is specified
b23fa75aa3
2022-07-08 23:18:09 +09:00
Nobuyoshi Nakada
cf991337fb
Make a local symbol static 2022-07-08 10:55:44 +09:00
Burdette Lamar
621e5c568a [ruby/date] Enhanced RDoc (https://github.com/ruby/date/pull/58)
Brings a dozen call-seq schemas into compliance with the doc guide.
    Adds links to section "Argument start" where needed.
    Revises (minorly) ::today.
    Otherwise, does not disturb existing text.

9aec11df50
2022-07-08 03:48:09 +09:00
Peter Zhu
c8b3bd45cc Fix extconf.rb for OpenSSL 3 without $warnflags
On Windows with OpenSSL 3, the gem fails to compile with the following
error message:

  ruby/src/ext/openssl/extconf.rb:188: undefined method \`sub!' for nil:NilClass

This is because $warnflags is nil.
2022-07-07 13:14:41 -04:00
Jean Boussier
587d2d199b thread_pthread.c: call SUSPENDED event when entering native_sleep
[Bug #18900]

Thread#join and a few other codepaths are using native sleep as
a way to suspend the current thread. So we should call the relevant
hook when this happen, otherwise some thread may transition
directly from `RESUMED` to `READY`.
2022-07-07 17:49:00 +02:00
Burdette Lamar
dbb23f29cb [ruby/date] [DOC] Enhanced RDoc (https://github.com/ruby/date/pull/57)
All things commercial.

9d3bc61728
2022-07-07 03:58:02 +09:00
Nobuyoshi Nakada
a070d4cceb
Local functions should be static 2022-07-05 09:30:05 +09:00
Burdette Lamar
f64bb67d75 [ruby/date] Update ext/date/date_core.c
8eb1c780fb

Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-07-05 04:12:50 +09:00
BurdetteLamar
5fe86666a5 [ruby/date] Enhanced RDoc
e36690f70e
2022-07-05 04:12:49 +09:00
BurdetteLamar
e323d8e6a2 [ruby/date] Enhanced RDoc
dcc0742623
2022-07-05 04:12:48 +09:00
BurdetteLamar
6317cf7de8 [ruby/date] Enhanced RDoc
91c632f156
2022-07-05 04:12:48 +09:00
BurdetteLamar
7212163e7c [ruby/date] Enhanced RDoc
5c18ec031e
2022-07-05 04:12:47 +09:00
BurdetteLamar
4ec14b6323 [ruby/date] Enhanced RDoc
fd3ae275c3
2022-07-05 04:12:46 +09:00
BurdetteLamar
24c80aea0e [ruby/date] Enhanced RDoc
ac25182c66
2022-07-05 04:12:45 +09:00
BurdetteLamar
c90110d146 [ruby/date] Enhanced RDoc
f9ecaad2ee
2022-07-05 04:12:44 +09:00