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

71943 Коммитов

Автор SHA1 Сообщение Дата
S.H 554befbf27
Reuse `rb_proc_arity` 2022-04-24 14:06:45 -07:00
git 84f410e5e6 * 2022-04-24 [ci skip] 2022-04-24 23:17:22 +09:00
Tanaka Akira 671d90eca3 add description for IO.nonblock=. 2022-04-24 23:16:55 +09:00
Kazuhiro NISHIYAMA e142bea799 Remove unnecessary sort
Because `Dir.[]` returns the sorted results since Ruby 3.0.
2022-04-23 11:59:20 +09:00
Jeremy Evans ab3cb29bd9 Avoid defining the same test class in multiple files
Should fix issues with parallel testing sometimes not running all
tests.

This should be viewed skipping whitespace changes.

Fixes [Bug #18731]
2022-04-22 15:00:16 -07:00
Jeremy Evans c2d38a0d2d Fix build if UBF_TIMER == UBF_TIMER_PTHREAD 2022-04-22 14:26:26 -07:00
Alan Wu 79fa27acc4 rbinstall: Also do `Gem.ruby` patching for unpacked bundled gems
Pointing `Gem.ruby` to the newly installed ruby gives mkmf the right
inputs to build extensions in bundled gems. Previously, this patching
was only done for compressed bundled gems.

This patch also prevents `tool/fake.rb` from propagating to the child
process running mkmf for the native extension. The way `tool/fake.rb`
changes mkmf variables using `Kernel#trace_var` created spooky action at
a distance which made debugging difficult.

AppVeyor Windows CI started to fail starting with
8a3663789c because it enabled extension
building for bundled gems on mswin. This patch should address the CI
failures.
2022-04-22 16:21:48 -04:00
Koichi Sasada 03d21a4fb0 introduce struct `rb_native_thread`
`rb_thread_t` contained `native_thread_data_t` to represent
thread implementation dependent data. This patch separates
them and rename it `rb_native_thread` and point it from
`rb_thraed_t`.

Now, 1 Ruby thread (`rb_thread_t`) has 1 native thread (`rb_native_thread`).
2022-04-23 03:08:27 +09:00
git 69d41480ec * 2022-04-23 [ci skip] 2022-04-23 00:50:32 +09:00
Koichi Sasada 702dc116c4 refactoring thread inits in vm.c
* `th_init` accepts vm and ractor.
* remove `ruby_thread_init` because it is duplicated with `th_init`.
* add some comments.
2022-04-23 00:50:13 +09:00
Jeremy Evans 4b14b2902a Uncomment code to raise LocalJumpError for yield across thread through enum
Not sure if this is the correct fix.  It does raise LocalJumpError in
the yielding thread as you would expect, but the value yielded to the calling
thread is still yielded without an exception.

Fixes [Bug #18649]
2022-04-21 20:48:27 -07:00
Hiroshi SHIBATA 3fa768c5c3
Use https for wss test 2022-04-22 12:11:36 +09:00
Peter Zhu eab354e17b [ruby/uri] Include RFC2396_REGEXP module directly
REGEXP is defined as RFC2396_REGEXP in lib/uri/common.rb. If we include
REGEXP then a broken URL is generated in rdoc for URI and URI::MailTo.

https://github.com/ruby/uri/commit/ed6ded9c80
2022-04-22 12:00:14 +09:00
OKURA Masafumi c94f964e3f [ruby/uri] Feat: Support WSS
There was a file for WSS so I added one line of `require_relative`
to make it work.
Now `URI.parse('wss://example.com')` returns `URI::WS`.

https://github.com/ruby/uri/commit/ff8a103564
2022-04-22 11:59:54 +09:00
git d1b9609cba * 2022-04-22 [ci skip] 2022-04-22 07:54:27 +09:00
Koichi Sasada 1c4fc0241d rename thread internal naming
Now GVL is not process *Global* so this patch try to use
another words.

* `rb_global_vm_lock_t` -> `struct rb_thread_sched`
  * `gvl->owner` -> `sched->running`
  * `gvl->waitq` -> `sched->readyq`
* `rb_gvl_init` -> `rb_thread_sched_init`
* `gvl_destroy` -> `rb_thread_sched_destroy`
* `gvl_acquire` -> `thread_sched_to_running` # waiting -> ready -> running
* `gvl_release` -> `thread_sched_to_waiting` # running -> waiting
* `gvl_yield`   -> `thread_sched_yield`
* `GVL_UNLOCK_BEGIN` -> `THREAD_BLOCKING_BEGIN`
* `GVL_UNLOCK_END` -> `THREAD_BLOCKING_END`

* removed
  * `rb_ractor_gvl`
  * `rb_vm_gvl_destroy` (not used)

There are GVL functions such as `rb_thread_call_without_gvl()` yet
but I don't have good name to replace them. Maybe GVL stands for
"Greate Valuable Lock" or something like that.
2022-04-22 07:54:09 +09:00
Akinori MUSHA cb02324c4e [ruby/pathname] Implement Pathname#lutime
https://github.com/ruby/pathname/commit/268cb5acff
2022-04-21 17:10:19 +09:00
Nobuyoshi Nakada 3ddf6ad4d2
Private local variables should shadow outer variables [Bug #18629] 2022-04-21 16:04:36 +09:00
Nobuyoshi Nakada ee48c9cda6
[Win32] allow pipe in flock 2022-04-21 15:14:08 +09:00
git b4f87ff838 * 2022-04-21 [ci skip] 2022-04-21 15:05:52 +09:00
卜部昌平 dcc42d4688 [Doc] correct my understanding about nonblocking mode
I was wrong.  Nonblocking mode nowadays does not interface with
IO#read.  Document updated. [ci skip]
2022-04-21 14:59:03 +09:00
卜部昌平 4a4c1d6920
[CI] resort to clang-14 (#5824)
* [CI] resort to clang-14

Clang 15 + --std=c2x combination seems actively developed now.
Might better wait for them to mature

* also change default compiler
2022-04-20 16:05:37 +09:00
Hiroshi SHIBATA c506ddac6c
Added assert_true and assert_false same as test-unit gem 2022-04-20 14:13:10 +09:00
Karol Bucek cf73cf5981 [ruby/net-http] Feature detect to make net/http usable with JRuby
Handle missing session_new_cb= and do not call
session_cache_mode=, as JRuby SSL does not support
these methods.

https://github.com/ruby/net-http/commit/3237ef4d8c
2022-04-20 13:01:08 +09:00
Jean byroot Boussier fa2df520bc
Enable C backtraces on Apple silicon (#5770)
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2022-04-20 11:52:47 +09:00
git d9482913a9 * 2022-04-20 [ci skip] 2022-04-20 10:22:23 +09:00
Jeremy Evans 90ccc5674a [ruby/net-http] Add ignore_eof access to HTTP and HTTPResponse
The ignore_eof setting on HTTPResponse makes it so an EOFError is
raised when reading bodies with a defined Content-Length, if the
body read was truncated due to the socket be closed.

The ignore_eof setting on HTTP sets the values used in responses
that are created by the object.

For backwards compatibility, the default is for both settings is
true.  However, unless you are specifically tested for and handling
truncated responses, it's a good idea to set ignore_eof to false so
that errors are raised for truncated responses, instead of those
errors silently being ignored.

Fixes [Bug #14972]

https://github.com/ruby/net-http/commit/4d47e34995
2022-04-20 10:22:06 +09:00
Nobuyoshi Nakada fada4d24f9
[DOC] adjust indent 2022-04-19 14:01:08 +09:00
Tim Smith 810b9c344a Resolve several markedown warnings
- Spaces before and after blocks.
- Single spaces after sentences everywhere

Signed-off-by: Tim Smith <tsmith@mondoo.com>
2022-04-19 08:32:37 +09:00
Tim Smith 4299375b9b Github -> GitHub
Fix the case of GitHub in various places

Signed-off-by: Tim Smith <tsmith@mondoo.com>
2022-04-19 08:31:41 +09:00
Burdette Lamar b41de3a1e8
[DOC] Enhanced RDoc for MatchData (#5822)
Treats:
    #to_s
    #named_captures
    #string
    #inspect
    #hash
    #==
2022-04-18 18:19:10 -05:00
Burdette Lamar 6db3f7c405
Enhanced RDoc for MatchData (#5821)
Treats:
    #[]
    #values_at
2022-04-18 15:52:07 -05:00
Burdette Lamar 86e23529ad
Enhanced RDoc for MatchData (#5820)
Treats:
    #pre_match
    #post_match
    #to_a
    #captures
2022-04-18 14:34:40 -05:00
Burdette Lamar b074bc3d61
[DOC] Enhanced RDoc for MatchData (#5819)
Treats:
    #begin
    #end
    #match
    #match_length
2022-04-18 13:02:35 -05:00
Burdette Lamar 9d1dd7a9ed
[DOC] Enhanced RDoc for MatchData (#5818)
Treats:
    #regexp
    #names
    #size
    #offset
2022-04-18 11:31:30 -05:00
git 96b2b0ee65 * 2022-04-19 [ci skip] 2022-04-19 00:45:58 +09:00
Burdette Lamar 51ea67698e
[DOC] Enhanced RDoc for Regexp (#5815)
Treats:
    ::new
    ::escape
    ::try_convert
    ::union
    ::last_match
2022-04-18 10:45:29 -05:00
Nobuyoshi Nakada 08b6aacc1a
Fix the wrong index of the previous component [Bug #18739] 2022-04-18 18:37:09 +09:00
Nobuyoshi Nakada b0666d6417
[DOC] Use consistent terms [Bug #18680] 2022-04-18 17:53:05 +09:00
Peter Zhu c69bdcf80c [ruby/bigdecimal] Fix docs
rdoc parses f[i] as a link, which results in a broken link.

https://github.com/ruby/bigdecimal/commit/a18522e9ca
2022-04-18 10:29:25 +09:00
Nobuyoshi Nakada 92361ad9c6 [ruby/bigdecimal] Adjust a local variable type to exponent
https://github.com/ruby/bigdecimal/commit/70146fb6ad
2022-04-18 10:29:23 +09:00
David Rodríguez e5a852b912 [ruby/tsort] Small tweaks for easier vendoring
Bundler vendors this file and we have some tools to automatically
prepend the `Bundler::` namespace so that the vendored version does not
collide with the stdlib version.

However, due to how methods are defined, it's hard for our vendoring
tool to do the right thing.

I think this makes the code simpler and things easier for us too.

https://github.com/ruby/tsort/commit/7088a7c814
2022-04-18 09:40:07 +09:00
git 8c4ed2d777 * 2022-04-18 [ci skip] 2022-04-18 09:18:41 +09:00
Nick Roma d6238007bf Fixes grammar 2022-04-18 09:18:23 +09:00
Kazuhiro NISHIYAMA 50f3e93c80
Fix a typo 2022-04-17 20:57:46 +09:00
Nobuyoshi Nakada be52c72889
Get rid of doubly caching 2022-04-17 18:57:26 +09:00
Nobuyoshi Nakada 2c6876f811
Get rid of magic numbers 2022-04-17 18:53:29 +09:00
Burdette Lamar 2b4b513ef0
[DOC] Enhanced RDoc for Regexp (#5812)
Treats:

    #fixed_encoding?
    #hash
    #==
    #=~
    #match
    #match?

Also, in regexp.rdoc:

    Changes heading from 'Special Global Variables' to 'Regexp Global Variables'.
    Add tiny section 'Regexp Interpolation'.
2022-04-16 15:20:03 -05:00
git bde06ce33a * 2022-04-17 [ci skip] 2022-04-17 03:41:12 +09:00
John Hawthorn 7950c4eb2d Fix class ancestry checks for duped classes
Previously in some when classes were duped (specifically those with a
prepended module), they would not correctly have their "superclasses"
array or depth filled in.

This could cause ancestry checks (like is_a? and Module comparisons) to
return incorrect results.

This happened because rb_mod_init_copy builds origin classes in an order
that doesn't have the super linked list fully connected until it's
finished. This commit fixes the previous issue by calling
rb_class_update_superclasses before returning the cloned class. This is
similar to what's already done in make_metaclass.
2022-04-16 11:40:56 -07:00