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

72141 Коммитов

Автор SHA1 Сообщение Дата
Alexander Ilyin 6fc16e748e [ruby/open-uri] [DOC] Fix markup for `URI.open`
* Add missing slash.

https://github.com/ruby/open-uri/commit/40023e63da
2022-06-07 00:06:56 +09:00
Nobuyoshi Nakada 66a9e452bb [ruby/rdoc] Use runnable command as DUMMY_PAGER
https://github.com/ruby/rdoc/commit/fec1ab2e41
2022-06-06 21:19:45 +09:00
David Rodríguez ba38318827 [rubygems/rubygems] Unify loading `Gem::Requirement`
It was being explicitly required from `Gem::Specification` but also a
strange autoload was set for it at `Gem::Version`. The autoload was non
standard because it should've been done in the `Gem` module, not in
`Gem::Specification`, since that's where the constant is expected to get
defined. Doing this might get deprecated in the future, and it was not
being effective anyways due to the explicit require.

Unify everything with an `autoload` at the right place.

https://github.com/rubygems/rubygems/commit/174ea3e24c
2022-06-06 18:36:31 +09:00
Hiroshi SHIBATA f4173ff2fa
debug is the bundled gems, not default gems 2022-06-06 18:19:15 +09:00
Pavel Rosický 4bc7cef866
[ruby/cgi] jruby support
https://github.com/ruby/cgi/commit/93326fb622
2022-06-06 18:13:01 +09:00
Yusuke Endoh 5d014bcb61 Use `sleep 0.5` for tests of GVL instrumentation API
The tests fail randomly on some platforms.

http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20220605T213004Z.fail.html.gz
http://rubyci.s3.amazonaws.com/arch/ruby-master/log/20220605T210003Z.fail.html.gz
```
[15737/21701] TestThreadInstrumentation#test_thread_instrumentation_fork_safe/home/chkbuild/chkbuild/tmp/build/20220605T213004Z/ruby/tool/lib/test/unit/assertions.rb:109:in `assert': Expected 0 to be nonzero?. (Test::Unit::AssertionFailedError)
```

The failures seem to depend on context switches. I suspect `sleep 0.05`
is too short, so this change tries to extend the wait time.
2022-06-06 12:52:15 +09:00
Kazuhiro NISHIYAMA 5267829641
Fix a typo [ci skip] 2022-06-06 12:00:22 +09:00
git 93555e013c * 2022-06-06 [ci skip] 2022-06-06 11:40:14 +09:00
Nobuyoshi Nakada a56a7119ac
Remove useless assignment always overridden 2022-06-06 11:30:26 +09:00
nick evans d8790ecd04
Export RbConfig::CONFIG["COROUTINE_TYPE"]
THREAD_MODEL is exported already, so this matches that.  Exporting this
is simpler than inspecting configure_args and arch and matching that up
with a specific configure.ac.

Fix GH-5976
2022-06-06 11:30:13 +09:00
git 5ce0be022f * 2022-06-05 [ci skip] 2022-06-05 15:18:26 +09:00
Nobuyoshi Nakada ed2dd17294
Use RBOOL 2022-06-05 14:21:01 +09:00
Nobuyoshi Nakada 5460675bbc [ruby/rdoc] Use command array form of `IO.popen` always
So that an exception raises by non-existent command, not via shell.

https://github.com/ruby/rdoc/commit/fd94dce69d
2022-06-04 20:32:27 +09:00
Nobuyoshi Nakada 2e6aee6ef2 [ruby/rdoc] Make all documents at the top level `extra_rdoc_files` [ci skip]
https://github.com/ruby/rdoc/commit/6b1a011243
2022-06-04 16:53:12 +09:00
Nobuyoshi Nakada 9a7be959b1 [ruby/rdoc] Remove `RDoc::RI::Driver#in_path?`
https://github.com/ruby/rdoc/commit/83051403d6
2022-06-04 16:42:10 +09:00
Nobuyoshi Nakada d4c7e4d5bb [ruby/rdoc] Enable pager tests
https://github.com/ruby/rdoc/commit/ce63794fde
2022-06-04 16:42:09 +09:00
Nobuyoshi Nakada 323acd263a [ruby/rdoc] Stop checking if pager command found
`IO.popen` does that job.

https://github.com/ruby/rdoc/commit/3bbbc5ac84
2022-06-04 16:42:08 +09:00
Nobuyoshi Nakada 76479de159 [ruby/rdoc] Remove never used win32console
https://github.com/ruby/rdoc/commit/47a1aef447
2022-06-04 16:40:19 +09:00
git c19a842e1c * 2022-06-04 [ci skip] 2022-06-04 02:50:50 +09:00
Alan Wu e4fe347302 Prevent printing crash report in a loop
In the event that we are crashing due to a corrupt Ruby stack, we might
re-enter rb_vm_bugreport() due to failed assertions in
rb_backtrace_print_as_bugreport() or SDR(). In these cases we were
printing the bug report ad infinitum with unbounded recusion.

I seem to run into this every once in a while and the amount of log it
prints out is pretty distracting. On CI environments it makes the log
output unnecessarily big. Let's fix this.
2022-06-03 13:50:32 -04:00
Jean Boussier 9125374726 [Feature #18339] GVL Instrumentation API
Ref: https://bugs.ruby-lang.org/issues/18339

Design:

- This tries to minimize the overhead when no hook is registered.
  It should only incur an extra unsynchronized boolean check.
- The hook list is protected with a read-write lock as to cause
  contention when some hooks are registered.
- The hooks MUST be thread safe, and MUST NOT call into Ruby as they
  are executed outside the GVL.
- It's simply a noop on Windows.

API:

```
rb_internal_thread_event_hook_t * rb_internal_thread_add_event_hook(rb_internal_thread_event_callback callback, rb_event_flag_t internal_event, void *user_data);
bool rb_internal_thread_remove_event_hook(rb_internal_thread_event_hook_t * hook);
```

You can subscribe to 3 events:

  - READY: called right before attempting to acquire the GVL
  - RESUMED: called right after successfully acquiring the GVL
  - SUSPENDED: called right after releasing the GVL.

The hooks MUST be threadsafe, as they are executed outside of the GVL, they also MUST NOT call any Ruby API.
2022-06-03 15:13:33 +02:00
Nobuyoshi Nakada d142eff658 [ruby/nkf] Constified invariant tables
https://github.com/ruby/nkf/commit/b386ddc11c
2022-06-03 20:25:12 +09:00
Kouhei Yanagita a4721ec6cd [DOC] Fix documentation of Numeric#div: Complex does not have #div 2022-06-03 14:35:47 +09:00
git 512d8a25e9 * 2022-06-03 [ci skip] 2022-06-03 14:13:31 +09:00
Nobuyoshi Nakada 1b44fcf222
[DOC] Mention the case to autoload already defined constant 2022-06-03 14:10:30 +09:00
Nobuyoshi Nakada 5342fcb67f
[DOC] Subjects of `autoload` are not restricted to modules 2022-06-03 14:09:11 +09:00
David Rodríguez 4eb140b0e4 [rubygems/rubygems] Remove redundant bitwise AND
https://github.com/rubygems/rubygems/commit/a20bac7924
2022-06-02 22:23:42 +09:00
David Rodríguez eb5a01970f [rubygems/rubygems] Add test cases from SHA1 RFC and improve test failure message
I found that the current test cases did not cover the bitwise AND
performed on modified words after each iteration
(7e5765a66c/bundler/lib/bundler/digest.rb (L50))

https://github.com/rubygems/rubygems/commit/c8de819fee
2022-06-02 22:23:42 +09:00
David Rodríguez 1d924ae410 [rubygems/rubygems] Remove leftover debugging puts
https://github.com/rubygems/rubygems/commit/7c6f15040d
2022-06-02 19:30:48 +09:00
Nobuyoshi Nakada af90433876
Typedef built-in function types 2022-06-02 16:05:35 +09:00
Nobuyoshi Nakada b96a3a6fd2
Move `GC.verify_compaction_references` [Bug #18779]
Define `GC.verify_compaction_references` as a built-in ruby method,
according to GC compaction support via `GC::OPTS`.
2022-06-02 15:32:00 +09:00
Nobuyoshi Nakada dfc8060756
Adjust indent and nesting [ci skip] 2022-06-02 14:34:48 +09:00
Nobuyoshi Nakada 9108db961d
Fix the condition when a new buffer is needed without GMP 2022-06-02 10:29:53 +09:00
git f35c5a2856 * 2022-06-02 [ci skip] 2022-06-02 10:13:03 +09:00
Nobuyoshi Nakada 689b5ae752
Split YJIT rules for CODEOWNERS 2022-06-02 10:12:34 +09:00
Noah Gibbs 9d18661e1d
Revert incorrect string-guard optimisation. (#5969)
Also add jhawthorn's test to for this bug.
Fix String#to_s invalidation test
2022-06-01 10:22:08 -04:00
Ellen Marie Dash 1177665e62 [rubygems/rubygems] Fix `bundle remove` by invalidating cached `Bundle.defintion`.
Prior to this commit, `bundle add GEM_NAME` updated the lockfile,
but `bundle remove GEM_NAME` left GEM_NAME in the lockfile.

By invalidating the cached `Bundle.definition`, the existing code
handles that without a problem.

https://github.com/rubygems/rubygems/commit/aa0794d6a9
2022-06-01 19:01:18 +09:00
David Rodríguez 0a6b9924bd [rubygems/rubygems] Fix generated standalone script for default gems
The installer is actually rewriting the spec's full gem path to be the
one of the newly installed gem, however the accessor was not properly
working for `StubSpecification` instances, and default gems are always
of this type, because they are always present locally.

Fix the accessor to properly update the underlying full specification.

https://github.com/rubygems/rubygems/commit/efa41babfa
2022-06-01 17:07:35 +09:00
David Rodríguez f5b88d93ae [rubygems/rubygems] Remove code that seems unnecessary
This change was never covered with a spec, and we have recently covered
the case of partially deleted gems with specs and it works fine
(installation is "auto-healed").

https://github.com/rubygems/rubygems/commit/6e66ee4235
2022-06-01 17:07:34 +09:00
David Rodríguez 8381c568e7 [rubygems/rubygems] Restore ability to load old marshalled gemspec that use `YAML::PrivateType`
This issue was not detected because when all traces of old YAML parser
and emitter `Syck` were removed, this null-type.gemspec.rz marshalled
gemspec was updated to no longer load `YAML::Syck::PrivateType` but load
`Psych::PrivateType` instead.

However, realworld old marshalled gemspecs still use the
`YAML::PrivateType` constant, so this commit replaces the gemspec to be
the real pry-0.4.7 marshalled gemspec, so that it catches this issue.

https://github.com/rubygems/rubygems/commit/51b330b8d2
2022-06-01 17:06:52 +09:00
David Rodríguez 89ec3def74 [rubygems/rubygems] Improve null private type test
This test is making sure that RubyGems is able to load old marshalled
gemspecs that include a field loading `YAML::PrivateType` instances in
the `rubyforge_project` field instead of `nil` due to a bug in old YAML
emitters.

At some point, the `rubyforge_project` field was removed and this test
was updated to just check another field. However, in the realworld other
fields do not have this issue and the marshalled gemspec we use for
testing still has this issue in the field reserved for the
`rubyforge_project` field. So I think updating the test to check other
field was not correct.

Instead, since the `rubyforge_project` field is now ignored, we no
longer need to worry about any conversion in this field. The only thing
we care about is that the marshal loading still works (which requires
that the constant is at least defined).

So this commit updates the test to make this more clear.

https://github.com/rubygems/rubygems/commit/cddfacf6d4
2022-06-01 17:06:52 +09:00
David Rodríguez ebb534801f [rubygems/rubygems] Remove no longer needed `Psych::PrivateType` cleanup
This old bug used to affect the `rubyforge_project` field in serialized
gemspecs. However, this field has been removed and it's no longer
present in marshaled loaded gemspecs.

So, while the constant is still present in these marshalled gemspecs and
we still need to make sure it exists, we no longer need to clean it up
from the loaded data.

https://github.com/rubygems/rubygems/commit/09df18e522
2022-06-01 17:06:51 +09:00
git 936e54063d * 2022-06-01 [ci skip] 2022-06-01 00:14:46 +09:00
David Rodríguez fd83b8887f [rubygems/rubygems] Skip duplicated dependency warning for gemspec dev deps
Generally this warning is skipped for gemspec development dependencies.
I think because it's common to override them in the Gemfile to change
the source, for example.

But the order of conditions was not correct and the warning was still
being printed in one case.

https://github.com/rubygems/rubygems/commit/da9d1d6a3f
2022-06-01 00:14:31 +09:00
David Rodríguez e2b421d679 [rubygems/rubygems] Give better conflict resolution advice
This alternative really uses only the Gemfile, and can never end up
being absurd, because it will never be suggested when there's no
lockfile, and it suggests deleting the lockfile.

https://github.com/rubygems/rubygems/commit/5d154dd50e
2022-05-31 16:13:52 +09:00
Jemma Issroff 9241d75a61
Add information from doc/hacking.md and doc/make_cheatsheet.md back i… (#5963)
Add information from doc/hacking.md and doc/make_cheatsheet.md back into contributing docs
2022-05-30 23:50:39 -04:00
Hiroshi SHIBATA 0cae30e1d3
Skip failing test with freebsd 2022-05-31 11:40:38 +09:00
dependabot[bot] 360c5fd6f9 [rubygems/rubygems] Bump rb-sys in /test/rubygems/test_gem_ext_cargo_builder/custom_name
Bumps [rb-sys](https://github.com/ianks/rb-sys) from v0.7.3 to v0.9.0.
- [Release notes](https://github.com/ianks/rb-sys/releases)
- [Commits](4a5dd97820...https://github.com/rubygems/rubygems/commit/e4f00b9761af)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

https://github.com/rubygems/rubygems/commit/874bbc96b2
2022-05-31 08:43:33 +09:00
Jakub Kulík 31bd79dda3
Add yjit.o to DTRACE_DEPENDENT_OBJS
In principle, we have a DTrace probe in yjit.c, so yjit.o should be
in DTRACE_DEPENDENT_OBJS for DTRACE_REBUILD=yes builds. This commit
adds to the list.

In practice DTRACE_REBUILD=yes implies the system has a Solaris-like
DTrace and YJIT doesn't support those systems. YJIT_OBJ expands to
nothing, and yjit.c isn't compiled.

I tested on OmniOS v11 r151034m with:

    $ ../src/configure --with-out-ext=psych MAKE=gmake AR=ar debugflags=-g
    $ gmake -j

It builds before and after this change.

[Bug #18480]
2022-05-30 18:30:57 -04:00
dependabot[bot] 7a0e681426 [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/ianks/rb-sys) from v0.7.3 to v0.9.0.
- [Release notes](https://github.com/ianks/rb-sys/releases)
- [Commits](4a5dd97820...https://github.com/rubygems/rubygems/commit/e4f00b9761af)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

https://github.com/rubygems/rubygems/commit/eb31b14a37
2022-05-31 07:10:28 +09:00