Граф коммитов

71407 Коммитов

Автор SHA1 Сообщение Дата
Burdette Lamar d52f41b765
[DOC] Enhanced RDoc for String (#5675)
Treats:
    #split
    #each_line
    #lines
    #each_byte
    #bytes
2022-03-18 17:17:00 -05:00
Peter Zhu 97426e15d7 [Bug #18627] Fix crash when including module
During lazy sweeping, the iclass could be a dead object that has not yet
been swept. However, the chain of superclasses of the iclass could
already have been swept (and become a new object), which would cause a
crash when trying to read the object.
2022-03-18 09:19:11 -04:00
Jeremy Evans 634e0a97eb Encourage arity argument in Proc#curry documentation for procs with variable arguments
This uses similar language to that used in Method#curry.
2022-03-17 20:34:13 -07:00
Shugo Maeda 2fdfd499db
Add a NEWS entry about [Feature #18598] [ci skip] 2022-03-18 11:53:36 +09:00
Shugo Maeda 1107839a7f Add String#bytesplice 2022-03-18 11:51:03 +09:00
John Hawthorn b8e72bd2e9 Revert "Faster rb_class_superclass"
This reverts commit 29b68b89a0.
2022-03-17 11:56:49 -07:00
Jeremy Evans b6804d62f8 Make Proc#parameters support lambda keyword for returning parameters as if lambda
This makes it easier to use Proc#parameters to build wrappers.

Implements [Feature #15357]
2022-03-17 11:52:02 -07:00
John Hawthorn 29b68b89a0 Faster rb_class_superclass
This uses the RCLASS_SUPERCLASSES array to quickly find the next
SUPERCLASS of klass which is a T_CLASS.
2022-03-17 11:48:39 -07:00
git 58b355175c * 2022-03-18 [ci skip] 2022-03-18 00:42:30 +09:00
Nobuyoshi Nakada f69a969544 Fix potential memory leak at fiber pool
Do not "allocate then wrap".  It leaks the allocated memory if
failed to create the wrapper.
2022-03-18 00:42:15 +09:00
Nobuyoshi Nakada cdf25cad6b Fix compilation error with `RB_EXPERIMENTAL_FIBER_POOL` 2022-03-18 00:42:15 +09:00
Nobuyoshi Nakada 4fdb10e65e
A positional Hash is not keyword arguments [Bug #18632] 2022-03-18 00:35:02 +09:00
Nobuyoshi Nakada e660b934b9
A positional Hash is not keyword arguments [Bug #18632] 2022-03-17 20:53:41 +09:00
Yuta Saito e9553a8cac spec: skip specs where set TZ environment variable for WASI
WASI doesn't respect TZ env var for now
2022-03-17 17:44:41 +09:00
Yuta Saito 7023b3d394 spec: disable a part of Kernel.open spec where spawns a process for WASI
WASI doesn't provide a way to spawn a new process
2022-03-17 17:33:12 +09:00
git df6f2b645f Update default gems list at fadc7a150c [ci skip] 2022-03-17 08:29:21 +00:00
Hiroshi SHIBATA fadc7a150c [ruby/logger] bump version to 1.5.1
https://github.com/ruby/logger/commit/c4a4155ab7
2022-03-17 17:28:33 +09:00
Nobuyoshi Nakada acbc2bdd30
Update the test for [Feature #18615] 2022-03-17 15:07:18 +09:00
Nobuyoshi Nakada 329c89bb42
Make implicit function declaration error [Feature #18615]
Enable `-Werror=implicit-function-declaration` by default for
building C extensions for early failures.
2022-03-17 14:37:34 +09:00
Yuta Saito e499d32689 spec: disable part of require_relative spec where uses symlink for WASI
cap-std, an underlying sandbox implementation of WASI in wasmtime, doesn't
allow to create a symlink to an absolute path to enforce sandbox restriction.

See also: 257867a1d3
2022-03-17 12:26:19 +09:00
Kazuhiro NISHIYAMA d06f787e9f
Fix broken links of rdoc
- `www.ruby-lang.org` links to `./www.ruby-lang.org`
- `cgi['field_name']` links to `./'field_name'`
2022-03-17 10:11:38 +09:00
Burdette Lamar 59a1a8185f
[DOC] Enhanced RDoc for String#split (#5644)
* Enhanced RDoc for String#split

* Enhanced RDoc for String#split

* Enhanced RDoc for String#split

* Enhanced RDoc for String#split

* Enhanced RDoc for String#split
2022-03-16 14:45:48 -05:00
Peter Zhu f38dcc78c4 Assume that klass of dummy head is NULL
klass of the dummy head of the subclass entries should always be NULL.
2022-03-16 15:19:30 -04:00
git a8703978b8 * 2022-03-17 [ci skip] 2022-03-17 04:15:47 +09:00
Peter Zhu 819f4f0e65 Always skip dummy head of subclass in rb_prepend_module
The first node of the subclass linked list of always a dummy head, so it
should be skipped.
2022-03-16 15:10:11 -04:00
Nobuyoshi Nakada 6d8f396f37 Suppress warnings by OpenSSL 3 2022-03-16 20:49:00 +09:00
Nobuyoshi Nakada b426de9e8e
[DOC] Prefer local rdoc links
- ensures exact same version
- avoid generated URLs
- no external access
- concise
2022-03-16 19:12:34 +09:00
Nobuyoshi Nakada 4d93b6299c
Initialize mutex for crypt(3) statically
Assuming that all platforms, where only `crypt` is available but
not `crypt_r`, are POSIX-base.
2022-03-16 18:51:34 +09:00
Nobuyoshi Nakada f91ea23324
Honor if `_Bool` is available
`AC_HEADER_STDBOOL` rejects stdbool.h in c2x, which is not
conforming to C99.
2022-03-16 17:50:13 +09:00
Martin Dürst 151208a19b Revert "Fix version check to use Emoji version for emoji-variation-sequences.txt"
This reverts commit 48f1e8c5d8.
2022-03-16 15:18:30 +09:00
Martin Dürst e85547ae81 Revert "Allow `.0` version mismatch to pass the tests"
This reverts commit fc6e4ce62b.
2022-03-16 15:17:30 +09:00
Martin Dürst 6d603cfde1 add Unicode auxiliary files and Unicode UCD emoji files download for ALWAYS_UPDATE_UNICODE 2022-03-16 15:15:44 +09:00
Nobuyoshi Nakada ebcbca96fb [ruby/rdoc] Fix full name of known class
Properly set the name of `File::Constants`, which is the only name
with a namespace in `RDoc::KNOWN_CLASSES`, and fixes longstanding bug
that `File::Constants` becomes `File::File::Constants`.

When it is generated by `rb_file_const` in dir.c, `name` is set to the
qualified name as same as `full_name`, and generated in the normal way
in file.c later, already set `full_name` is cleared and `name` will be
constructed from the enclosing namespace and the `name`.  It will
results in duplicated namespace, `File::File::Constants`.

https://github.com/ruby/rdoc/commit/3a8d6df562
2022-03-16 15:05:41 +09:00
Koichi Sasada fc6e4ce62b Allow `.0` version mismatch to pass the tests
With `make update-unicode`, some tests failed with the following error
due to header mismatch.

* `RbConfig::CONFIG['UNICODE_EMOJI_VERSION']` => 14.0
* the header line is `# emoji-variation-sequences-14.0.0.txt`

So the last `.0` is mismatch.
This patch allows additional `.0` in the header line.

Please revert this patch when a correct patach is merged.

```
  1) Error:
TestEmojiBreaks#test_embedded_emoji:
RuntimeError: File Name Mismatch: line: # emoji-variation-sequences-14.0.0.txt, expected filename: emoji-variation-sequences.txt
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:88:in `block (2 levels) in read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:82:in `foreach'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:82:in `block in read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:79:in `each'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:79:in `read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:111:in `all_tests'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:127:in `test_embedded_emoji'
  2) Error:
TestEmojiBreaks#test_mixed_emoji:
RuntimeError: File Name Mismatch: line: # emoji-variation-sequences-14.0.0.txt, expected filename: emoji-variation-sequences.txt
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:88:in `block (2 levels) in read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:82:in `foreach'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:82:in `block in read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:79:in `each'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:79:in `read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:111:in `all_tests'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:139:in `test_mixed_emoji'
  3) Error:
TestEmojiBreaks#test_single_emoji:
RuntimeError: File Name Mismatch: line: # emoji-variation-sequences-14.0.0.txt, expected filename: emoji-variation-sequences.txt
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:88:in `block (2 levels) in read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:82:in `foreach'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:82:in `block in read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:79:in `each'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:79:in `read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:111:in `all_tests'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:117:in `test_single_emoji'
```
2022-03-16 11:30:37 +09:00
YO4 5d90c60109
Avoid console input behavior in windows 10 [Bug #18588]
When ANSI versions of PeekConsoleInput read multibyte charactor
partially, subsequent ReadFile returns wrong data on newer Windows
10 versions (probably since Windows Terminal introduced).  To
avoid this, use Unicode version of of PeekConsoleInput/ReadConsole.
2022-03-16 10:28:35 +09:00
Martin Dürst 48f1e8c5d8 Fix version check to use Emoji version for emoji-variation-sequences.txt 2022-03-16 08:46:04 +09:00
Martin Dürst 56d9d78f14 Remove Unicode 13.0.0 related files 2022-03-16 08:30:04 +09:00
git bc62cbd563 * 2022-03-16 [ci skip] 2022-03-16 00:50:14 +09:00
John Hawthorn d76ba1c219 Fast rb_class_inherited_p
This uses the superclass table recently introduced to implement fast
inheritance checking between classes (ex. Foo < Bar).

This is almost identical to what we do in class_search_class_ancestor
(as called by rb_obj_is_kind_of) except that we are checking both
directions: ie. both whether Foo < Bar and whether Bar < Foo.
2022-03-15 08:49:53 -07:00
Kazuhiro NISHIYAMA 7aabdbe837 [rubygems/rubygems] Fix a typo
https://github.com/rubygems/rubygems/commit/3e06a91435
2022-03-15 11:37:43 +09:00
Yuta Saito 459bbdeb74 wasm/README.md: add manual config.guess download and autoconf steps
Autoconf distributed with Ubuntu 22.04 is very old and doesn't support
WASI as an OS, so add instructions to download the latest config.guess,
then run `./autogen.sh`.

See also: 2297012efd
2022-03-15 10:25:12 +09:00
S-H-GAMELINKS f27770679f [DOC]Fix FreeBSD Bugzilla link 2022-03-15 09:23:57 +09:00
Nobuyoshi Nakada b85457c710 [rubygems/rubygems] [DOC] Enable Gem::Package example
Other code must not be between the doc and class definition.

https://github.com/rubygems/rubygems/commit/366784aae5
2022-03-15 08:40:35 +09:00
xtkoba 63b1633f86 [ruby/win32ole] Get rid of potential undefined behavior
See https://bugs.llvm.org/show_bug.cgi?id=50236

https://github.com/ruby/win32ole/commit/019ec2b3cb
2022-03-15 08:33:40 +09:00
Nobuyoshi Nakada aa347cbe65 [ruby/win32ole] Rename toplevel WIN32OLE_* classes
https://github.com/ruby/win32ole/commit/bc7deb6a6a
2022-03-15 08:20:47 +09:00
David Rodríguez 6a8bc90278 [rubygems/rubygems] Report Github Actions CI provider within user agent string
See
https://docs.github.com/es/actions/learn-github-actions/environment-variables#default-environment-variables.

So that we can show stats about it at https://ecosystem.rubytogether.org

https://github.com/rubygems/rubygems/commit/48d6dc68f8
2022-03-15 04:44:33 +09:00
git b7fe052a06 * 2022-03-15 [ci skip] 2022-03-15 01:18:16 +09:00
Nobuyoshi Nakada 41d63d3130 [rubygems/rubygems] Move `:stopdoc:` directive
If this is at the top level, it stops the documentation of the
entire module, but not only the part in this file.

https://github.com/rubygems/rubygems/commit/34e8c1ee06
2022-03-15 01:18:03 +09:00
Yuta Saito b1bcad5e3a spec: skip '~' test for wasi due to lack of shell 2022-03-14 23:05:15 +09:00
Yuta Saito fe2e5c13f9 spec: skip ruby_exe tests for wasi due to lack of subprocess 2022-03-14 23:04:13 +09:00