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

2193 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 2373feade5
For parallel test 2023-08-12 11:19:10 +09:00
Nobuyoshi Nakada b377793b6e
Fold dotted outputs from test-spec 2023-08-12 11:19:09 +09:00
Mike Dalessio d2343368ab Deprecate Kernel#open and IO support for subprocess creation/forking
Deprecate Kernel#open and IO support for subprocess creation and
forking. This deprecates subprocess creation and forking in

- Kernel#open
- URI.open
- IO.binread
- IO.foreach
- IO.readlines
- IO.read
- IO.write

This behavior is slated to be removed in Ruby 4.0

[Feature #19630]
2023-08-10 09:38:11 +09:00
Benoit Daloze dc54574ade Update to ruby/spec@9e278f5 2023-08-02 18:53:03 +02:00
Benoit Daloze 3c41a04b6c Fix encoding switches when RUBYOPT is empty or only spaces
* Follow-up of dbbc3583ba which broke this.
2023-08-02 17:13:38 +02:00
Nobuyoshi Nakada 1bda22f5fe
`Refinement#refined_class` is now deprecated 2023-07-31 23:23:30 +09:00
Nobuyoshi Nakada 0d86cc4caf [rubygems/rubygems] Use the dedicated method to convert file path
The dedicated method `File.path` to deal with pathname-like objects
has been provided since ruby 1.9.0.
Also adds a test for rubygems/rubygems#6837.

https://github.com/rubygems/rubygems/commit/258c6eda80
2023-07-30 01:36:23 +00:00
Nobuyoshi Nakada 3d87eec94a Add examples of `return` in `eval` 2023-07-30 00:44:13 +09:00
Hiroshi SHIBATA 35517baae5 Use Gem::BUNDLED_GEMS::SINCE 2023-07-28 14:57:10 +09:00
Jeremy Evans 786a864900 Make {Nil,True,False}Class#singleton_method always raise NameError
{Nil,True,False}Class#singleton_methods always returns [] indicating
that there are no singleton methods defined, so #singleton_method
should be consistent with that.

Fixes [Bug #11064]
2023-07-26 07:27:15 -07:00
Hiroshi SHIBATA cf1f2e9d06 [rubygems/rubygems] bin/rubocop -A
https://github.com/rubygems/rubygems/commit/e8a4184429
2023-07-25 06:23:29 +00:00
Hiroshi SHIBATA 979d1fa5fe [rubygems/rubygems] Extract Gem::BUNDLED_GEMS from Bundler
https://github.com/rubygems/rubygems/commit/e30e86aa60
2023-07-25 06:23:28 +00:00
Hiroshi SHIBATA 8fbe7d0295 [rubygems/rubygems] Skip warnings if bundled gems is already loaded
https://github.com/rubygems/rubygems/commit/9583a7eb82
2023-07-25 06:23:28 +00:00
Hiroshi SHIBATA 64530b545f [rubygems/rubygems] Added warnings targets for old version of Ruby
https://github.com/rubygems/rubygems/commit/d0c1d97105
2023-07-25 06:23:26 +00:00
Hiroshi SHIBATA fc5dbea4c3 [rubygems/rubygems] Added Ruby version for bundled gems to warnings
https://github.com/rubygems/rubygems/commit/d61c1362e7
2023-07-25 06:23:26 +00:00
Hiroshi SHIBATA cc2617ae3f [rubygems/rubygems] Added csv as stub gem to build_repo1
https://github.com/rubygems/rubygems/commit/d2f2597c31
2023-07-25 06:23:24 +00:00
Hiroshi SHIBATA df4ac25bd9 [rubygems/rubygems] Added examples for warnings feature
https://github.com/rubygems/rubygems/commit/78807add23
2023-07-25 06:23:24 +00:00
Jean Boussier 43a5c19135 Use the caller location as default filename for eval family of methods
[Feature #19755]

Before (in /tmp/test.rb):

```ruby
Object.class_eval("p __FILE__") # => "(eval)"
```

After:

```ruby
Object.class_eval("p __FILE__") # => "(eval at /tmp/test.rb:1)"
```

This makes it much easier to track down generated code in case
the author forgot to provide a filename argument.
2023-07-24 14:51:20 +02:00
Hiroshi SHIBATA dd1af4b22d
[rubygems/rubygems] Rename local to lockfile and global to system
https://github.com/rubygems/rubygems/commit/456fd05d3a
2023-07-24 15:04:24 +09:00
David Rodríguez 0b0df03b0d
[rubygems/rubygems] Avoid printing using messages when version has not changed
https://github.com/rubygems/rubygems/commit/9635a2fd74
2023-07-24 15:03:15 +09:00
David Rodríguez 8c82b35791
[rubygems/rubygems] Exclude Bundler from missing locked dependencies check
Bundler is special since it's not actually locked in the lockfile as a
regular gem (only via `BUNDLED WITH`). So exclude it from that check.

https://github.com/rubygems/rubygems/commit/9f1756ec47
2023-07-24 15:03:15 +09:00
David Rodríguez 0e7536bf49 [rubygems/rubygems] Prefer squiggly heredocs over custom helper
https://github.com/rubygems/rubygems/commit/258476c38a
2023-07-24 14:59:34 +09:00
David Rodríguez 5a43b0ddd5 [rubygems/rubygems] Remove unused module inclusion
https://github.com/rubygems/rubygems/commit/0f58ef6a32
2023-07-24 14:59:34 +09:00
David Rodríguez c31a9cf829 [rubygems/rubygems] Refactor spec helpers for reading lockfiles
https://github.com/rubygems/rubygems/commit/ea2a30ba08
2023-07-24 14:59:33 +09:00
David Rodríguez ebc3174123 [rubygems/rubygems] Simplify `bundle lock` specs
https://github.com/rubygems/rubygems/commit/6301d3eece
2023-07-24 14:59:32 +09:00
Jean Boussier 460c27dc15 [ruby/syntax_suggest] Handle new eval source location
See https://bugs.ruby-lang.org/issues/19755

In Ruby 3.3, using `eval` without providing a source location
will now default to `"(eval at #{__FILE__}:#{__LINE__})"`.

https://github.com/ruby/syntax_suggest/commit/8e5076472e
2023-07-20 17:58:52 +00:00
Nobuyoshi Nakada 9c94db7cfc
Add tests for `return` in `BEGIN` and `END` blocks 2023-07-19 00:43:25 +09:00
Jean Boussier fa30b99c34 Implement Process.warmup
[Feature #18885]

For now, the optimizations performed are:

  - Run a major GC
  - Compact the heap
  - Promote all surviving objects to oldgen

Other optimizations may follow.
2023-07-17 11:20:15 +02:00
alexandre184 e5825de7c9
[Bug #19769] Fix range of size 1 in `String#tr` 2023-07-15 16:36:53 +09:00
David Rodríguez c1fb25f6fc
[rubygems/rubygems] Don't run any git commands when sorting and comparing git sources
Previously, when sorting and comparing git Gemfile vs lockfile sources during
`bundler/setup` to figure out whether we need to re-resolve or not, we
would try to find the default branch if nothing more specific was
specified in the Gemfile.

If the git cache has been deleted thought, that would fail.

The error would still be swallowed (and the branch would simply not be
displayed), but trying to clone would still generate the side effect of
creating the parent folder for the clone.

That could affect non-writable systems that don't expect `bundler/setup`
to write to the filesystem at all.

To fix this, override `Bundler::Source::Git#identifier` to use
exclusively static information, so it does not even try to clone the
repo nor generate any side effects.

https://github.com/rubygems/rubygems/commit/582eb2ef39
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA 8cf5297ba5
[rubygems/rubygems] Dont't use Bundler::VERSION
https://github.com/rubygems/rubygems/commit/46cd9be69a
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA d3305cab44
[rubygems/rubygems] restart with BUNDLE_VERSION if it's specified
https://github.com/rubygems/rubygems/commit/57cfe7cf8d
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA f16c880f77
[rubygems/rubygems] Introduce bundle config set version feature
https://github.com/rubygems/rubygems/commit/c431a1df52
2023-07-13 11:36:03 +09:00
David Rodríguez 8f61a4c5b2
[rubygems/rubygems] Remove unused variable
https://github.com/rubygems/rubygems/commit/802457b0a1
2023-07-13 11:36:03 +09:00
Benoit Daloze 055f7219bc Improve ArgumentError message for Module#set_temporary_name 2023-07-06 18:27:13 +02:00
Benoit Daloze 9ee1877e4a Ensure the name given to Module#set_temporary_name is not a valid constant path
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-07-06 18:27:13 +02:00
Benoit Daloze e76022f41c Specs for Module#set_temporary_name should be in their own file 2023-07-06 18:27:13 +02:00
Takashi Kokubun f314656c23 Skip a failing spec for the latest bigdecimal 2023-07-05 14:18:51 -07:00
Ellen Marie Dash 4f2f1ddf22 [rubygems/rubygems] Test that git sources in lockfiles have stable sort order
https://github.com/rubygems/rubygems/commit/4c982684ea
2023-07-04 14:54:26 +09:00
David Rodríguez 09382135de [rubygems/rubygems] Fix git source lockfile unstability
We have some flags that limit running git commit commands under certain
situations, for example, when running under `--local`. However, those
should only affect remote git operations, not local read-only operations
like `git --version`, or `git rev-parse --abbrev-ref HEAD`.

This commit refactors things to achieve that.

By doing this, the `#to_s` representation of a source is more
consistent, since we don't get any errors when reading the checked out
branch, and we avoid some flip-flop lockfile issues.

https://github.com/rubygems/rubygems/commit/4a529fce81
2023-07-04 14:54:26 +09:00
David Rodríguez 0fcb4c6af7 [rubygems/rubygems] Fix another incorrect removal of "ruby" platform from lockfile
When dependencies in path sources have changed, we'll be re-resolving,
and we can't really know whether the resolution will be valid or invalid
for the Ruby platform, so skip the removal in that case.

https://github.com/rubygems/rubygems/commit/afc3b0956f
2023-07-04 14:54:25 +09:00
Benoit Daloze 515bd42144 Update to ruby/spec@30e1c35 2023-06-26 15:55:11 +02:00
Benoit Daloze f73fa29927 Update to ruby/mspec@3cf2d16 2023-06-26 15:55:09 +02:00
Samuel Williams a87bce86bb
Allow setting the name of a class or module. (#7483)
Introduce `Module#set_temporary_name` for setting identifiers for otherwise
anonymous modules/classes.
2023-06-21 16:49:51 +09:00
Hiroshi SHIBATA 1edbaa850f Merge rubygems/rubygems HEAD
Pick from 880dd95996
2023-06-20 13:35:13 +09:00
Hiroshi SHIBATA 2c219ab215 [rubygems/rubygems] Rubocop 1.51.0 or later didn't support Ruby 2.6
https://github.com/rubygems/rubygems/commit/522b5f1ecd
2023-06-15 07:01:27 +09:00
David Rodríguez 3e7f5b02ae [rubygems/rubygems] Improve error message in frozen mode edge case
When a top level dependency is missing from the lockfile, and we're in
frozen mode, we should also print a "frozen error".

https://github.com/rubygems/rubygems/commit/3e82b835e3
2023-06-15 07:01:25 +09:00
David Rodríguez e86f4c581b [rubygems/rubygems] Improve frozen mode error message
This error message is also printed when using `bundler/setup` in frozen
model, so we're not necessarily installing any gems when it happens.

This new message play nicer with all situations.

https://github.com/rubygems/rubygems/commit/6874bbacce
2023-06-15 07:01:25 +09:00
David Rodríguez 23ecaab8dd [rubygems/rubygems] Use "frozen" rather than "deployment" in error message
I think it communicates better what's going on.

https://github.com/rubygems/rubygems/commit/07a25767a4
2023-06-15 07:01:24 +09:00
David Rodríguez 2ff9b7b93d [rubygems/rubygems] Show missing spec in lockfile incomplete error message
https://github.com/rubygems/rubygems/commit/b86caaa3d5
2023-06-15 07:01:24 +09:00
David Rodríguez e7749c4dea [rubygems/rubygems] Remove weird line breaks in the middle of error message
https://github.com/rubygems/rubygems/commit/22b8caf42f
2023-06-15 07:01:21 +09:00
David Rodríguez 96e3f31c1e [rubygems/rubygems] Make frozen mode spec also pass on Bundler 3
https://github.com/rubygems/rubygems/commit/ad52f840f2
2023-06-15 07:01:20 +09:00
David Rodríguez e1038f943f [rubygems/rubygems] This spec is independent from global sources
https://github.com/rubygems/rubygems/commit/d91c245921
2023-06-15 07:01:20 +09:00
Gareth Adams eaf11d3dd4 [rubygems/rubygems] Stop publishing Gemfile in default gem template
Similarly to how the other ignored files are intended for local
development and not for production, the Gemfile and Gemfile.lock files
for a gem only relate to local development and aren't useful to people
installing the gem.

https://github.com/rubygems/rubygems/commit/59049c04be
2023-06-08 15:20:05 +00:00
David Rodríguez 03246719cc [rubygems/rubygems] Fix `path` vs `deployment` precedence when path set through ENV
The `deployment` setting sets `path` to `vendor/bundle` implicitly, but
that should only apply if `path` is not set explicitly, at any level.

https://github.com/rubygems/rubygems/commit/3552c064c1
2023-06-06 10:52:57 +09:00
David Rodríguez 7b317243ad [rubygems/rubygems] Unexclude some specs on bundler 3
These should all be passing on Bundler 3.

https://github.com/rubygems/rubygems/commit/4a8c172965
2023-06-06 10:52:56 +09:00
David Rodríguez 6353f1d5e8 [rubygems/rubygems] Fill in missing deployment specs
https://github.com/rubygems/rubygems/commit/e16aa47b8f
2023-06-06 10:52:56 +09:00
David Rodríguez 603772440c [rubygems/rubygems] Remove redundant specs
They are already tested above.

https://github.com/rubygems/rubygems/commit/23073dcece
2023-06-06 10:52:55 +09:00
David Rodríguez 1f9e66836b [rubygems/rubygems] Fix inline mode with multiple sources
If we're in inline mode, Bundler first resolves using only local gems,
and if some gems are missing, then it re-resolves using remote gems.
However, "source resolution" from the initial "local" try was being
memoized, resulting in Bundler not looking for some gems remotely in the
second resolution.

This commit forces a proper re-resolve in this case.

https://github.com/rubygems/rubygems/commit/fdc631075e
2023-06-06 10:52:53 +09:00
Benoit Daloze 957b6a491f rb_io_descriptor() is available since 3.1 2023-06-01 11:41:41 +02:00
Samuel Williams a218ed5692
Hide the usage of `rb_io_t` where possible. (#7880)
This retries the compatible parts of the previously reverted PR so we can continue to update related code without breaking backwards compatibility.
2023-06-01 14:23:30 +09:00
NARUSE, Yui 85dcc4866d Revert "Hide most of the implementation of `struct rb_io`. (#6511)"
This reverts commit 18e55fc1e1.

fix [Bug #19704]
https://bugs.ruby-lang.org/issues/19704
This breaks compatibility for extension libraries. Such changes
need a discussion.
2023-06-01 08:43:22 +09:00
Hiroshi SHIBATA 3bc5f6b240
[rubygems/rubygems] tool_dir needs to handle ruby/ruby repo now
https://github.com/rubygems/rubygems/commit/550d90f4ba
2023-05-31 13:55:30 +09:00
Hiroshi SHIBATA 4bbeed6134 Merge RubyGems/Bundler master from 4076391fce5847689bf2ec402b17133fe4e32285 2023-05-30 21:50:07 +09:00
Samuel Williams 18e55fc1e1
Hide most of the implementation of `struct rb_io`. (#6511)
* Add rb_io_path and rb_io_open_descriptor.

* Use rb_io_open_descriptor to create PTY objects

* Rename FMODE_PREP -> FMODE_EXTERNAL and expose it

FMODE_PREP I believe refers to the concept of a "pre-prepared" file, but
FMODE_EXTERNAL is clearer about what the file descriptor represents and
aligns with language in the IO::Buffer module.

* Ensure that rb_io_open_descriptor closes the FD if it fails

If FMODE_EXTERNAL is not set, then it's guaranteed that Ruby will be
responsible for closing your file, eventually, if you pass it to
rb_io_open_descriptor, even if it raises an exception.

* Rename IS_EXTERNAL_FD -> RUBY_IO_EXTERNAL_P

* Expose `rb_io_closed_p`.

* Add `rb_io_mode` to get IO mode.

---------

Co-authored-by: KJ Tsanaktsidis <ktsanaktsidis@zendesk.com>
2023-05-30 10:02:40 +09:00
Benoit Daloze 99ce41564e Refactor guards for Time.new spec 2023-05-29 18:33:51 +02:00
Peter Zhu b7a26dfa16 Unify error messages of rb_num2ulong and rb_num2ull
The error messages were slightly different due, which causes different
behaviour on 32-bit and 64-bit systems.
2023-05-29 11:55:39 -04:00
Benoit Daloze c48d496e8c Update to ruby/spec@c3677cf 2023-05-29 15:27:57 +02:00
Samuel Williams 6d976eb534
Fix "runs a C function with the global lock unlocked and unlocks IO with the generic RUBY_UBF_IO" on Windows. (#7848)
* Enable borked spec.

* Ensure win32 wrappers are visible and used.

* Reorganise `read`/`write`/`pipe` in `thread_spec.c`.
2023-05-24 22:45:34 +09:00
Nobuyoshi Nakada d8da563f9e
Add a newline at EOF [ci skip] 2023-05-24 15:04:07 +09:00
Samuel Williams 28056a6d16
Add support for pread/pwrite on windows. (#7827) 2023-05-24 09:15:20 +09:00
Jean byroot Boussier 31ac8efca8
Hash.new: print a deprecation warning when receiving keyword arguments (#7828)
[Feature #19236]

In Ruby 3.3, `Hash.new` shall print a deprecation warning if keyword arguments
are passed instead of treating them as an implicit positional Hash.

This will allow to safely introduce a `capacity` keyword argument in 3.4

Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
2023-05-23 15:51:28 +02:00
Hiroshi SHIBATA a7d7032100
Manually merge syntax_suggest-1.1.0 2023-05-23 10:05:47 +09:00
schneems c638ffa700
[ruby/syntax_suggest] Fix
https://github.com/ruby/syntax_suggest/pull/187 Handle if/else with
empty/comment
line

Reported in #187 this code:

```
class Foo
  def foo
    if cond?
      foo
    else
      # comment
    end
  end

  # ...

  def bar
    if @recv
    end_is_missing_here
  end
end
```

Triggers an incorrect suggestion:

```
Unmatched keyword, missing `end' ?
   1  class Foo
   2    def foo
>  3      if cond?
>  5      else
   8    end
  16  end
```

Part of the issue is that while scanning we're using newlines to determine when to stop and pause. This is useful for determining logically smaller chunks to evaluate but in this case it causes us to pause before grabbing the "end" that is right below the newline. This problem is similar to https://github.com/ruby/syntax_suggest/pull/179.

However in the case of expanding same indentation "neighbors" I want to always grab all empty values at the end of the scan. I don't want to do that when changing indentation levels as it affects scan results.

There may be some way to normalize this behavior between the two, but the tests really don't like that change.

To fix this issue for expanding against different indentation I needed a way to first try and grab any additional newlines with the ability to rollback that guess. In #192 I experimented with decoupling scanning from the AroundBlockScan logic. It also added the ability to take a snapshot of the current scanner and rollback to prior changes.

With this ability in place now we:

- Grab extra empties before looking at the above/below line for the matching keyword/end statement
- If there's a match, grab it
- If there's no match, discard the newlines we picked up in the evaluation

That solves the issue.

https://github.com/ruby/syntax_suggest/commit/513646b912
2023-05-23 10:05:47 +09:00
schneems aaf815c626
[ruby/syntax_suggest] Refactor Scanner logic out of AroundBlockScan introduce history
AroundBlockScan started as a utility class that was meant to be used as a DSL for scanning and making new blocks. As logic got added to this class it became hard to reason about what exactly is being mutated when. I pulled the scanning logic out into it's own class which gives us a clean separation of concerns. This allowed me to remove a lot of accessors that aren't core to the logic provided by AroundBlockScan.

In addition to this refactor the ScanHistory class can snapshot a scan. This allows us to be more aggressive with scans in the future as we can now snapshot and rollback if it didn't turn out the way we wanted.

The change comes with a minor perf impact:

before: 5.092678   0.104299   5.196977 (  5.226494)
after: 5.128536   0.099871   5.228407 (  5.249542)

This represents a 0.996x change in speed (where 1x would be no change and 2x would be twice as fast). This is a 0.38% decrease in performance which is negligible. It's likely coming from the extra blocks being created while scanning. This is negligible and if the history feature works well we might be able to make better block decisions which is means fewer calls to ripper which is the biggest bottleneck.

While this doesn't fix https://github.com/ruby/syntax_suggest/issues/187 it's a good intermediate step that will hopefully make working on that issue easier.

https://github.com/ruby/syntax_suggest/commit/ad8487d8aa
2023-05-23 10:05:47 +09:00
Ivanov-Anton 1dd5427abe
Fix typo in spec file description [ci skip]
fixed typo for spec description
2023-05-21 09:59:34 +09:00
Samuel Williams 2df5a697e2
Add Fiber#kill, similar to Thread#kill. (#7823) 2023-05-18 23:33:42 +09:00
Martin Dürst 30326844c7 fix wording of spec description [ci skip] 2023-05-13 10:07:00 +09:00
Nobuyoshi Nakada 2d9bc3efe5 [Bug #19597] Freeze script name 2023-05-10 17:14:20 +09:00
Hiroshi SHIBATA 0ef6e718d9
Merge https://github.com/rubygems/rubygems/pull/6655 manually. 2023-05-10 15:02:29 +09:00
Hiroshi SHIBATA 9d3ab15827 Relax regexp for console assertion 2023-05-09 12:57:12 +09:00
Jean Boussier 6339cb70c3 marshal.c: shallow freeze user objects
When `freeze: true` argument is passed.

[Bug #19427]
2023-04-26 16:54:25 +02:00
Benoit Daloze 82995d4615 Update to ruby/spec@7f6ca5b 2023-04-25 17:27:57 +02:00
Benoit Daloze e3d05001ed Workaround CRuby adding x86_64-linux-fake in $LOADED_FEATURES 2023-04-25 17:09:53 +02:00
Benoit Daloze d562663e40 Update to ruby/spec@7f69c86 2023-04-25 17:09:53 +02:00
Benoit Daloze d3da01cd11 Update to ruby/mspec@1d8cf64 2023-04-25 17:09:53 +02:00
schneems 3d5febf65b [ruby/syntax_suggest] Clean up output
I previously left a comment stating I didn't know why a certain method existed. In investigating the code in `CaptureCodeContext#capture_before_after_kws` I found that it was added as to give a slightly less noisy output.

The docs for AroundBlockScan#capture_neighbor_context only describe keywords as being a primary concern. I modified that code to only include lines that are keywords or ends. This reduces the output noise even more.

This allows me to remove that `start_at_next_line` method.

One weird side effect of the prior logic is it would cause this code to produce this output:

```
        class OH
          def hello

          def hai
          end
        end
```

```
          1  class OH
        > 2    def hello
          4    def hai
          5    end
          6  end
```

But this code to produce this output:

```
        class OH
          def hello
          def hai
          end
        end
```

```
          1  class OH
        > 2    def hello
          4    end
          5  end
```
Note the missing `def hai`. The only difference between them is that space.

With this change, they're now both consistent.

https://github.com/ruby/syntax_suggest/commit/4a54767a3e
2023-04-25 14:43:06 +09:00
Hiroshi SHIBATA f77dc6fb16 [ruby/syntax_suggest] standardrb --fix-unsafely spec/spec_helper.rb
https://github.com/ruby/syntax_suggest/commit/6e266b3b2b
2023-04-25 14:43:05 +09:00
Jeremy Evans f8e7048348 Allow anonymous memberless Struct
Previously, named memberless Structs were allowed, but anonymous
memberless Structs were not.

Fixes [Bug #19416]
2023-04-24 07:37:20 -07:00
Nobuyoshi Nakada dafbaabc04
Check the precision of `getrusage` at runtime 2023-04-23 12:01:13 +09:00
Nobuyoshi Nakada c5529aa5fc Fix a guard of `Process.times`
`GETRUSAGE_BASED_CLOCK_PROCESS_CPUTIME_ID` clock uses `getrusage`
always if available as the name states.  That is if it is implemented
`getrusage` is available, regardless microseconds in its results.
2023-04-22 21:21:35 +09:00
Nobuyoshi Nakada 4cff7a92b8 Fix an example of `Process.times`
Prior to commit 5806c54447, it was "at
least one result with precision beyond milliseconds (with none-zero
microseconds) should exist"; after this commit, "at least one result
should have zero microseconds".  This chance is lower than the
previous condition.
2023-04-22 21:21:35 +09:00
Nobuyoshi Nakada e956052fa9
Skip when unix socket path is too long
Eventually the path directly under "/tmp" is complained by `rm_r` in
spec/mspec/lib/mspec/helpers/fs.rb.
2023-04-21 22:17:18 +09:00
Hiroshi SHIBATA dbcdac00e6 [rubygems/rubygems] Revert "Bundler::YAMLSerializer.load couldn't raise error when invalid yaml was provided"
This reverts commit https://github.com/rubygems/rubygems/commit/cfcfde04c783.

https://github.com/rubygems/rubygems/commit/ac21ae7083
2023-04-20 01:57:16 +00:00
Nobuyoshi Nakada 7821708c84
Use ASCII-compatible encoding for tests
Since these files are written in a wide character encoding, stop at
first NUL byte and are actually empty.  ASCII-incompatible encodings
have never been supported as source encoding.
2023-04-20 09:57:49 +09:00
Hiroshi SHIBATA 8b95b33a9d [rubygems/rubygems] Bundler::YAMLSerializer.load couldn't raise error when invalid yaml was provided
https://github.com/rubygems/rubygems/commit/cfcfde04c7
2023-04-19 06:56:22 +00:00
Vladimir Dementyev b09f5c7bf7
MatchData#named_captures: add optional symbolize_names keyword (#6952) 2023-04-19 11:19:31 +12:00
Jean Boussier f3979aec76 Add spec for `Warning[:performance]`
[Feature #19538]
2023-04-17 10:29:46 +02:00
Jean Boussier 52449b5b75 Implement ObjectSpace::WeakMap#delete and ObjectSpace::WeakKeyMap#delete
[Feature #19561]

It's useful to be able to remove references from weak maps.
2023-04-15 16:29:46 +02:00
git 9a1c737dee * append newline at EOF. [ci skip] 2023-04-15 00:10:49 +00:00