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

15809 Коммитов

Автор SHA1 Сообщение Дата
Jean Boussier e3aabe93aa Implement Queue#pop(timeout: sec)
[Feature #18774]

As well as `SizedQueue#pop(timeout: sec)`

If both `non_block=true` and `timeout:` are supplied, ArgumentError
is raised.
2022-08-02 11:04:28 +02:00
Nobuyoshi Nakada ec3f59309e [Bug #17767] Now `ENV.clone` raises `TypeError` as well as `ENV.dup`
One year ago, the former method has been deprecated while the latter
has become an error.  Then the 3.1 released, it is enough time to make
also the former an error.
2022-08-02 16:40:12 +09:00
dependabot[bot] 24204d54ab [rubygems/rubygems] Bump rb-sys in /test/rubygems/test_gem_ext_cargo_builder/custom_name
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.26 to 0.9.28.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.26...v0.9.28)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

https://github.com/rubygems/rubygems/commit/edea8fbfa0
2022-08-02 04:14:48 +09:00
dependabot[bot] 25022bad85 [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.26 to 0.9.28.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.26...v0.9.28)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

https://github.com/rubygems/rubygems/commit/831a001697
2022-08-02 02:37:55 +09:00
Koichi Sasada 5bbba76489 respect current frame of `rb_eval_string`
`self` is nearest Ruby method's `self`.
If there is no ruby frame, use toplevel `self` (`main`).

https://bugs.ruby-lang.org/issues/18780
2022-08-01 17:48:05 +09:00
Akinori MUSHA 1a73a6cdd2
Implement Enumerator::Product and Enumerator.product [Feature #18685] 2022-07-30 20:05:14 +09:00
Nobuyoshi Nakada af265d73fb [ruby/rdoc] Fix blockquote with word in verbatim
https://github.com/ruby/rdoc/commit/75eee668a5
2022-07-30 11:04:11 +09:00
Ethan b2cc74a50d [flori/json] test parsing of unicode, mixing literal characters with escaped
https://github.com/flori/json/commit/82fe866da2
2022-07-29 19:10:10 +09:00
konsolebox 419ad1e13e [ruby/optparse] Also accept '-' as an optional argument (https://github.com/ruby/optparse/pull/35)
https://github.com/ruby/optparse/commit/f2b8318631
2022-07-29 19:10:10 +09:00
Nobuyoshi Nakada f29f1d22c3 [ruby/rdoc] Fix formatting blockquote in verbatim
Reported at https://github.com/ruby/rdoc/pull/907#discussion_r932505816

https://github.com/ruby/rdoc/commit/86384ac7f9
2022-07-29 09:21:33 +09:00
Takashi Kokubun 0d68286be9
Revert "Try reproducing the MinGW hang on time command (#6168)"
This reverts commit bee5089d67.

Looking at https://github.com/ruby/ruby/runs/7564065637?check_suite_focus=true,
we concluded that the ruby process for test-all is stuck before exit
when this issue reproduces.

However, because of our limited bandwidth to support MinGW, we're not
investigating this, and therefore we need to keep skipping tests that
hang on this environment.
2022-07-28 16:12:46 -07:00
Matthew Draper ab08a43ec5
YJIT: Teach getblockparamproxy to handle the no-block case without exiting (#6191)
Teach getblockparamproxy to handle the no-block case without exiting

Co-authored-by: John Hawthorn <john@hawthorn.email>

Co-authored-by: John Hawthorn <john@hawthorn.email>
2022-07-28 11:38:07 -04:00
Hiroshi SHIBATA 3eade59919
Skip randomly failing tests with FreeBSD 12 2022-07-28 19:45:15 +09:00
Hiroshi SHIBATA d448ecc7b1
Fix the missing brackets 2022-07-28 19:25:52 +09:00
Hiroshi SHIBATA 202ce7de01
test_io_console.rbL399 is also randomly failing same as bfc697f1e2 2022-07-28 19:14:01 +09:00
Takashi Kokubun bee5089d67
Try reproducing the MinGW hang on time command (#6168)
to see if it really exits correctly. 

GitHub Support asked me to confirm the command is exiting correctly.
2022-07-27 21:29:14 -07: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
dependabot[bot] 382cde96fa [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.20 to 0.9.26.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.20...v0.9.26)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

https://github.com/rubygems/rubygems/commit/fe76234cf1
2022-07-26 04:56:40 +09:00
dependabot[bot] fab5a0e62a [rubygems/rubygems] Bump rb-sys in /test/rubygems/test_gem_ext_cargo_builder/custom_name
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.20 to 0.9.26.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.20...v0.9.26)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

https://github.com/rubygems/rubygems/commit/8b1d0672a3
2022-07-26 01:53:02 +09:00
Nobuyoshi Nakada f61dd38e5c
Wait the test thread to sleep
Revert "Synchronize the test thread sleep"

This reverts commit 307835fe31.
2022-07-25 18:50:08 +09:00
Nobuyoshi Nakada 307835fe31
Synchronize the test thread sleep 2022-07-25 12:01:09 +09:00
Ashley Ellis Pierce 244bda7efd [rubygems/rubygems] Display mfa warnings on gem signin
https://github.com/rubygems/rubygems/commit/4dc77b7099

Co-authored-by: Jenny Shen <jenny.shen@shopify.com>
2022-07-23 03:42:59 +09:00
st0012 b3be030740 [ruby/reline] Rename dialog_pointer_* to dialog_highlight_*
"Pointer" is not what we usually use to describe a selected item.

"Highlight" is a more common word for the scenario so we should use it instead.

https://github.com/ruby/reline/commit/b4279d1557
2022-07-22 23:34:49 +09:00
Nobuyoshi Nakada a4e890b93e [rubygems/rubygems] Use `SystemExit#status` as `exit_code`
No reasons to manage separately.

https://github.com/rubygems/rubygems/commit/8ede5c886e
2022-07-22 21:01:31 +09:00
Takuya Noguchi d7ffd3fea4
RubyGems: Enable Style/StringLiterals cop
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-07-22 12:07:23 +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
Jeremy Evans 7223c0da15 Do not chomp trailing line separator IO#each with nil separator and chomp
nil separator means no sepator, so chomp should not remove a line
separator.

Partially Fixes [Bug #18770]
2022-07-21 12:55:24 -07: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
Jeremy Evans 203f179ce7 Revert "Do not chomp trailing line separator IO#each with nil separator and chomp"
This reverts commit 04f86ad0b5.

This is causing CI issues, reverting for now.
2022-07-21 08:29:50 -07:00
Jeremy Evans 12ac8971a3 Do not have class/module keywords look up ancestors of Object
Fixes case where Object includes a module that defines a constant,
then using class/module keyword to define the same constant on
Object itself.

Implements [Feature #18832]
2022-07-21 08:28:05 -07:00
Jeremy Evans 04f86ad0b5 Do not chomp trailing line separator IO#each with nil separator and chomp
nil separator means no sepator, so chomp should not remove a line
separator.

Partially Fixes [Bug #18770]
2022-07-21 08:13:40 -07:00
Jeremy Evans 423b41cba7 Make String#each_line work correctly with paragraph separator and chomp
Previously, it was including one newline when chomp was used,
which is inconsistent with IO#each_line behavior. This makes
behavior consistent with IO#each_line, chomping all paragraph
separators (multiple consecutive newlines), but not single
newlines.

Partially Fixes [Bug #18768]
2022-07-21 08:02:32 -07:00
Nobuyoshi Nakada 86b29ef877 [ruby/digest] Ignore test_ractor.rb on non-Ractor ruby
https://github.com/ruby/digest/commit/352b8c1636
2022-07-21 11:45:48 +09:00
Nobuyoshi Nakada 4a7ecc1bd9 [ruby/digest] Find an available digest algorithm to test
https://github.com/ruby/digest/commit/8844716793
2022-07-21 09:58:46 +09:00
Daniel Colson 32e406d6d3 Ensure _id2ref finds symbols with the correct type
Prior to this commit it was possible to call `ObjectSpace._id2ref` with
an offset static symbol object_id and get back a new, incorrectly tagged
symbol:

```
> sensible_sym = ObjectSpace._id2ref(:a.object_id)
=> :a
> nonsense_sym = ObjectSpace._id2ref(:a.object_id + 40)
=> :a
> sensible_sym == nonsense_sym
=> false
```

`nonsense_sym` ends up tagged with `RUBY_ID_INSTANCE` instead of
`RB_ID_LOCAL`. That means we can do silly things like:

```
> foo = Object.new
> foo.instance_variable_set(:a, 123)
(irb):2:in `instance_variable_set': `a' is not allowed as an instance variable name (NameError)
> foo.instance_variable_set(ObjectSpace._id2ref(:a.object_id + 40), 123)
=> 123
> foo.instance_variables
=> [:a]
```

This was happening because `get_id_entry` ignores the tag bits when
looking up the symbol. So `rb_id2str(symid)` would return a value and
then we'd continue on with the nonsense `symid`.

This commit prevents the situation by checking that the `symid` actually
matches what we get back from `get_id_entry`. Now we get a `RangeError`
for the nonsense id:

```
> ObjectSpace._id2ref(:a.object_id)
=> :a
> ObjectSpace._id2ref(:a.object_id + 40)
(irb):1:in `_id2ref': 0x000000000013f408 is not symbol id value (RangeError)
```

Co-authored-by: John Hawthorn <jhawthorn@github.com>
2022-07-20 10:38:44 -07:00
Noah Gibbs 6140edb5df
Match +YJIT in Ruby desc when testing segv (#6141)
In test_bug_reporter and test_rubyoptions we intentionally
test child processes that cause SEGV. We run them with YJIT
if the parent uses YJIT so that the text description
matches the parent RUBY_DESCRIPTION.
2022-07-20 10:48:58 -04:00
David Rodríguez fa5724cca9 [rubygems/rubygems] Fix `ruby setup.rb --destdir /foo` modifying global specs
Running a command like that is actually removing any previous default
bundler specs in the default RubyGems installation (outside of destdir).
It should instead only modify destdir.

https://github.com/rubygems/rubygems/commit/5ed275383c
2022-07-20 19:55:34 +09:00
David Rodríguez fae0d60120 [rubygems/rubygems] Refactor destdir checks
https://github.com/rubygems/rubygems/commit/ca956c0de2
2022-07-20 19:55:34 +09:00
David Rodríguez fcfb3ce371 [rubygems/rubygems] More cleanup
https://github.com/rubygems/rubygems/commit/6012800a20
2022-07-20 19:55:33 +09:00
David Rodríguez bdef3c73fe [rubygems/rubygems] Unify common logic
https://github.com/rubygems/rubygems/commit/e5434be14c
2022-07-20 19:55:33 +09:00
David Rodríguez c0aa8ee947 [rubygems/rubygems] Fix casing typo when resetting `RbConfig::CONFIG["ENABLE_SHARED"]`
https://github.com/rubygems/rubygems/commit/3d1ae0050b
2022-07-20 03:03:33 +09:00
Nobuyoshi Nakada 8f17591435 [Bug #18905] Check symbol name types more strictly 2022-07-20 00:23:38 +09:00
Nobuyoshi Nakada ee1d2b276a [ruby/fileutils] Add an octal prefix to clarify to be octal
https://github.com/ruby/fileutils/commit/332025bc02

Co-Authored-By: David Rodríguez <deivid.rodriguez@riseup.net>
2022-07-19 17:33:44 +09:00
dependabot[bot] 3ac9956dee [rubygems/rubygems] Bump rb-sys in /test/rubygems/test_gem_ext_cargo_builder/custom_name
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.19 to 0.9.20.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.19...v0.9.20)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

https://github.com/rubygems/rubygems/commit/2689b6b940
2022-07-19 04:46:16 +09:00
dependabot[bot] c6fe11cf2c [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.19 to 0.9.20.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.19...v0.9.20)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

https://github.com/rubygems/rubygems/commit/ee2facb8f2
2022-07-19 02:49:01 +09:00
Peter Zhu dd362a786a [ruby/rdoc] Fix call-seq for aliased method with similar names
deduplicate_call_seq has a bug that skips call-seq for methods where the
alias is a prefix of the method name. For example, if the alias name is
"each" and the current method name is "each_line", then
deduplicate_call_seq will skip all call-seq for "each_line" since it
will believe that it is for the alias.

https://github.com/ruby/rdoc/commit/1148988ccc
2022-07-18 22:36:57 +09:00
David Rodríguez a74634de10 [rubygems/rubygems] Fix upgrading RubyGems with a customized `Gem.default_dir`
https://github.com/rubygems/rubygems/commit/16d01f9486
2022-07-18 19:07:55 +09:00
Nobuyoshi Nakada 68903df6f6
[Bug #18922] Normalize time at 24:00:00 UTC 2022-07-18 00:59:27 +09:00
Yuta Saito fab8f3bde6 [rubygems/rubygems] Stop using `/dev/null` for silent ui for WASI platform
WASI doesn't guarantee that `/dev/null` is present.
So without this patch, we needed to mount host's `/dev` directory to WASI
guest process to avoid `ENOTCAPABLE` error while `require "bundler/setup"`

https://github.com/rubygems/rubygems/commit/e9187ab61f
2022-07-17 19:44:51 +09:00