Commit graph

67695 commits

Author SHA1 Message Date
Burdette Lamar
05e9efa323
[ruby/optparse] More on tutorial (https://github.com/ruby/optparse/pull/9)
* More on tutorial

* More on tutorial

* More on tutorial

* More on tutorial: clearer example output

84dfd92d2a
2021-07-28 20:13:38 +09:00
BurdetteLamar
8844eba488
[ruby/optparse] Beginnings of tutorial
f209276f79
2021-07-28 20:13:38 +09:00
Benoit Daloze
59a65f2d24 Update to latest uri
* bc47bf71df
* To include the fix from https://github.com/ruby/uri/pull/27
2021-07-28 12:26:31 +02:00
Nobuyoshi Nakada
71945ad827
Fix a comment [ci skip] 2021-07-28 19:08:05 +09:00
Nobuyoshi Nakada
342dbd4f4e
Remove duplicate declarations
Also defined in include/ruby/internal/core/rarray.h which always
will be included.
2021-07-28 16:58:25 +09:00
Jeremy Evans
b3d62a77d9 [ruby/zlib] Synchronize access to zstream to prevent segfault in multithreaded use
I'm not sure whether this handles all multithreaded use cases,
but this handles the example that crashes almost immediately
and does 10,000,000 total deflates using 100 separate threads.

To prevent the tests from taking forever, the committed test
for this uses only 10,000 deflates across 10 separate threads,
which still causes a segfault in the previous implementation
almost immediately.

Fixes [Bug #17803]

4b1023b3f2
2021-07-28 13:40:03 +09:00
Marcus Stollsteimer
218c3b2548 [ruby/readline] Improve the gem's description
Improve the language in the gem's summary and description;
also remove U+00A0 (no-break space) characters from post-install box.

5037cf7ffc
2021-07-28 13:35:36 +09:00
Olle Jonsson
5b574b40a9
[ruby/resolv-replace] gemspec: Drop executables directive
This gem exposes no executables.

fa405185f7
2021-07-28 13:32:33 +09:00
Hiroshi SHIBATA
51321985fb
[ruby/resolv] Bump version to 0.2.1
095f1c003f
2021-07-28 13:32:33 +09:00
Olle Jonsson
0663134ad1
[ruby/getoptlong] RDoc: escape to avoid links to the word Set
We would like to avoid linking to the Set class for these words.

33b56d6141
2021-07-28 13:32:33 +09:00
Olle Jonsson
eb3a7eda5e
[ruby/getoptlong] gemspec: Drop executables directives
This gem exposes 0 executables.

4522163cbd
2021-07-28 13:32:32 +09:00
Jeremy Evans
345db8f2aa Avoid pointless attempts to open .so file if already required
When attempting to require a file without an extension that has
already been required or provided with an .so extension, only
look for files with an .rb extension. There is no point in
trying to find files with an .so extension, since we already
know one has been loaded.

Previously, attempting to require such a file scanned the load
path twice, once for .rb and once for .so.  Now it only scans
once for .rb.  The scan once for .rb cannot be avoided, since
the .rb file would take precedence and should be loaded if it
exists.

Fixes [Bug #10902]
2021-07-28 12:29:45 +09:00
Hiroshi SHIBATA
30d0e5d1ae
[ruby/digest] Also drop to support Ruby 2.4
360a7de366
2021-07-28 11:48:36 +09:00
Hiroshi SHIBATA
260546ba26
[ruby/digest] Use Gemfile instead of Gem::Specification#add_development_dependency
460a6f807e
2021-07-28 11:48:36 +09:00
Hiroshi SHIBATA
5b96f4dd8c
[ruby/digest] Drop to support Ruby 2.3
23dc9c7425
2021-07-28 11:48:36 +09:00
Hiroshi SHIBATA
be4b0eee19
[ruby/digest] Use pend instead of skip
82fb618157
2021-07-28 11:48:36 +09:00
Olle Jonsson
26e859b5c7
[ruby/digest] gemspec: Avoid distributing extraneous files
0a451e0c94
2021-07-28 11:48:36 +09:00
Olle Jonsson
add48acea3
[ruby/digest] gemspec: Explicitly have 0 executables
086d54ba94
2021-07-28 11:48:36 +09:00
Olle Jonsson
478f0ddb5f
[ruby/digest] Experiment: Use a .pre version in gemspec
This makes it slightly more explicit that this is not a definite new version.

2bb5bb78a3
2021-07-28 11:48:36 +09:00
Olle Jonsson
73c5d4d54e
[ruby/digest] Experiment: bump patch version
This is a test, to see if the build failures are about the shipped Ruby master version of this gem.

d2606b2cce
2021-07-28 11:48:36 +09:00
Nobuyoshi Nakada
42ea359a0c
Suppress "possibly useless use of * in void context" warning 2021-07-28 11:43:54 +09:00
Yusuke Endoh
6505c77501 Revert "Fix potential hang when joining threads."
This reverts commit 13f8521c63.

20210727T230009Z.fail.html.gz
20210728T000009Z.fail.html.gz

This revert is to confirm whether the commit is the cause.
If the failures consistently occur after this revert, I'll
reintroduce the commit.
2021-07-28 11:05:36 +09:00
Jeremy Evans
4fc9ddd7b6 Update Capturing and Anchors sections of regexp documention
Document that only first 9 numbered capture groups can use the \n
backreference syntax.  Document \0 backreference.  Document \K anchor.

Fixes [Bug #14500]
2021-07-27 12:30:43 -07:00
Jeremy Evans
35e467080c Make Float#floor with ndigits argument handle error
The previous implementation could result in a returned
float that is 1/(10**ndigits) too low.  First try adding
one before dividing, and if that results in a value that is
greater than the initial number, then try the original
calculation.

Spec added for ciel, but the issue doesn't appear to affect
ciel, at least not for the same number.  If the issue does
effect ciel, a similar fix could probably work for it.

Fixes [Bug #18018]
2021-07-27 11:00:45 -07:00
git
338b604b32 * 2021-07-28 [ci skip] 2021-07-28 02:48:15 +09:00
Jeremy Evans
a6dc48f86a Fix infinite loop in ensure after NoMemoryError
VM patch from wanabe.

Test based on example from buzztaiki (Taiki Sugawara).

Test fails when compiles with -DRUBY_DEBUG, as that can
can use rb_bug instead of NoMemoryError, which doesn't
allow testing this case. Test also fails on MingW, as
RangeError is used instead of NoMemoryError. Skip the
test in either case.

Fixes [Bug #15779]
2021-07-27 10:47:53 -07:00
Jeremy Evans
230111802c
[ruby/find] Add Errno::EINVAL to list of ignored errors
This error can occur on Windows for certain filenames on certain
code pages.

Fixes [Bug #14591]

0a474d1027
2021-07-27 21:20:31 +09:00
Nobuyoshi Nakada
acfec23bec
Remove probably unintented symlinks 2021-07-27 18:49:28 +09:00
Martin Dürst
26b1e6fca8 Deal with Unicode ranges in the file emoji-sequences.txt
Detect Unicode ranges and loop over them.
This fixes issue #18028.
2021-07-27 18:14:20 +09:00
Hiroshi SHIBATA
c3d31377b3
Bump unicode version for Ruby 3.1 2021-07-27 18:00:32 +09:00
Hiroshi SHIBATA
6656309fe2
Fix test failure for parallel testing 2021-07-27 17:34:13 +09:00
Hiroshi SHIBATA
b875a85c53
Added missing require for URI::WS class 2021-07-27 17:33:18 +09:00
Martin Dürst
3010b40477 Adjust test/ruby/enc/test_emoji_breaks.rb to handle Emoji Version 13.1
Deal with the issue that the emoji files in emoji/13.1 have Unicode
Emoji version 13.1, but at the same time the files in 13.0.0/ucd/emoji
are still at Emoji version 13.0. Specifically:
- Add a version attribute to TestEmojiBreaks::BreakFile
- Take the version for emoji-variant-sequences.txt from the Unicode
  version, removing the last two characters.
- Improve information in exceptions for file name and version mismatches.
2021-07-27 17:10:49 +09:00
Martin Dürst
01e98d8785 Change Unicode Emoji Version from 13.0 to 13.1 2021-07-27 17:10:49 +09:00
Hiroshi SHIBATA
d3d68aa842
[ruby/uri] User assert_ractor for test case of Ractor
bbf8b44dba
2021-07-27 16:57:03 +09:00
Benoit Daloze
1cf111774f
[ruby/uri] Add proper Ractor support to URI
* Using a module to map scheme name to scheme class, which also works with Ractor.
* No constant redefinition, no ObjectSpace, still fast lookup for initial schemes.

883567fd81
2021-07-27 16:54:27 +09:00
Benoit Daloze
090d799c24
[ruby/uri] Revert "Fix to support Ruby 3.0 Ractor"
* This reverts commit 1faa4fdc161d7aeebdb5de0c407b923beaecf898.
* It has too many problems, see https://github.com/ruby/uri/pull/22 for discussion.

b959da2dc9
2021-07-27 16:54:26 +09:00
kvokka
a288c21a5d
[ruby/uri] Fix to support Ruby 3.0 Ractor
1faa4fdc16
2021-07-27 16:54:26 +09:00
Nobuyoshi Nakada
82191da2a2 Predefine recursive key ID 2021-07-27 15:40:27 +09:00
Nobuyoshi Nakada
03e7fc895e Extracted repeatedly defined IDs 2021-07-27 15:40:27 +09:00
Nobuyoshi Nakada
537e824561 Don't redefine #rb_intern over and over again 2021-07-27 15:40:27 +09:00
Nobuyoshi Nakada
6329da588b Use predefined IDs 2021-07-27 15:40:27 +09:00
Nobuyoshi Nakada
0754cc4888 Added intern_ids.rb 2021-07-27 15:40:27 +09:00
Samuel Williams
13f8521c63 Fix potential hang when joining threads.
If the thread termination invokes user code after `th->status` becomes
`THREAD_KILLED`, and the user unblock function causes that `th->status` to
become something else (e.g. `THREAD_RUNNING`), threads waiting in
`thread_join_sleep` will hang forever. We move the unblock function call
to before the thread status is updated, and allow threads to join as soon
as `th->value` becomes defined.
2021-07-27 18:23:30 +12:00
Nobuyoshi Nakada
cd49940cff
Run in a separated process to run finalizers certainly 2021-07-27 14:55:20 +09:00
Yusuke Endoh
2de7c29b37 test/ruby/test_parse.rb: Prevent an "unused variable" warning 2021-07-27 13:41:58 +09:00
Nobuyoshi Nakada
2d0a1e5f61
Try GC more during suppressing the warning 2021-07-27 12:30:06 +09:00
Nobuyoshi Nakada
ed51e8b8fa
Make GCed during suppressing the warning
Consume the VM stack more, to make the target object get GCed with
more probability during suppressing the warning.
2021-07-27 11:47:11 +09:00
git
5b27c1a15b * 2021-07-27 [ci skip] 2021-07-27 09:57:09 +09:00
Daniel Niknam
bd8daa8523
[rubygems/rubygems] Remove the warning for not defining a gem server source
Bundler has deprecated gemfiles without a global source and this feature
is now obsolete. `Bundler::Definition#has_rubygems_remotes?` is removed
because it's not used anymore.

d29dd2cb7b
2021-07-27 09:25:57 +09:00