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

1552 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 7f3786c3e8
Use an isolated class
The number of all instances of `Class` may be affected by GC-able
anonymous classes created by other tests.
2021-10-10 01:20:40 +09:00
OKURA Masafumi 7e506716d2
Newly generated gems require Ruby 2.6.0
In 2021, Ruby 2.5 and older are EOL.
We can set the default required Ruby version to 2.6.0 to
encourage people to use newer Ruby.
If the command is executed with old Ruby, it falls back to 2.3.0.
It's still possible to create a gem for older Ruby just by changing
two lines of code (one in gemspec and another is in rubocop.yml).
2021-10-09 09:07:47 +09:00
David Rodríguez 91f794b516 [rubygems/rubygems] I see no harm in this, allow it
https://github.com/rubygems/rubygems/commit/01feb40283
2021-10-09 08:05:46 +09:00
David Rodríguez 991a3aad05 [rubygems/rubygems] `git commit` no longer needs to be allowed to fail
https://github.com/rubygems/rubygems/commit/12af03d32f
2021-10-09 08:05:34 +09:00
David Rodríguez a5bae843ff [rubygems/rubygems] Let `update_git` work with whatever branch is checkout out
Unless the `:branch` option is passed.

It's more efficient, and it results in less hardcoding of "master".

https://github.com/rubygems/rubygems/commit/aa5c3409ab
2021-10-09 08:05:23 +09:00
David Rodríguez 5a34b639fc [rubygems/rubygems] Make adding files and committing into a single command
For efficiency.

https://github.com/rubygems/rubygems/commit/979d1634dd
2021-10-09 08:05:11 +09:00
David Rodríguez b857a87653 [rubygems/rubygems] Keep different code in custom branch in dummy repo
This doesn't affect the outcome of the test, but it makes the `git
commit` command inside `update_git` not fail because of not having
anything to commit.

https://github.com/rubygems/rubygems/commit/ad0160ed97
2021-10-09 08:04:59 +09:00
David Rodríguez 70066196a0 [rubygems/rubygems] Fix typo
We want to update the original repo, not a fresh one.

This went undetected because the `git commit` command inside the
`update_git` method ignores failures, and in this case it was failing
because all files are untracked in the new repo.

I will fix that later but for now fix the typo.

https://github.com/rubygems/rubygems/commit/c889f1d715
2021-10-09 08:04:48 +09:00
Masataka Pocke Kuwabara d03d122ba1 [rubygems/rubygems] Improve performance of Specification#missing_extensions?
https://github.com/rubygems/rubygems/commit/90c1919f94
2021-10-09 08:04:08 +09:00
gabriele renzi ad92651d64 [rubygems/rubygems] Add glob infomation to Bundler::Source::Git#to_s
The glob information was not specified in the string representation for
a source, which led to non-deterministic behaviour when generating the
lockfile, since sources are sorted by this value.

https://github.com/rubygems/rubygems/commit/493b880abc
2021-10-09 08:03:43 +09:00
Jeremy Evans 08759edea8
Remove autoload for constant if the autoload fails
Previously, if an autoload failed (the file was loaded, but the
constant was not defined by the autoloaded file). Ruby will try
to autoload again if you delete the autoloaded file from
$LOADED_FEATURES.  With this change, the autoload and the
constant itself are removed as soon as it fails.

To handle cases where multiple threads are autoloading, when
deleting an autoload, handle the case where another thread
already deleted it.

Fixes [Bug #15790]
2021-10-08 14:54:26 -07:00
Hiroshi SHIBATA ae5dffd666
Followed up bd6e1a0f08 2021-10-07 18:34:29 +09:00
Nobuyoshi Nakada 7ed1180e00
Remove the useless platform guard 2021-10-06 12:19:52 +09:00
Nobuyoshi Nakada ddca0c6686
Fix filesystem dependent tests
Ruby cannot guarantee the resolutions of underlying filesystems.
2021-10-06 11:41:03 +09:00
Benoit Daloze b9f34062f0 Update to ruby/spec@ccf0d85 2021-10-05 19:41:44 +02:00
Jean Boussier afcbb501ac marshal.c Marshal.load accepts a freeze: true option.
Fixes [Feature #18148]

When set, all the loaded objects are returned as frozen.

If a proc is provided, it is called with the objects already frozen.
2021-10-05 18:34:56 +02:00
Jean byroot Boussier 529fc204af
marshal.c: don't call the proc with partially initialized objects. (#4866)
For cyclic objects, it requires to keep a st_table of the partially
initialized objects.
2021-09-30 16:50:31 +02:00
Hiroshi SHIBATA 2f19f4d1d8
Followed up behavior change of set
f360ebb306
2021-09-28 19:15:12 +09:00
Hiroshi SHIBATA 395da04aa6
Followed up ruby/spec examples for date.
f9f7f3a75e
2021-09-28 19:14:02 +09:00
Nobuyoshi Nakada 69ce154d6e
FL_USER flags on ohter than T_DATA are reserved [Misc #18059] 2021-09-25 15:38:38 +09:00
Nobuyoshi Nakada 225a29b9bc
FL_USER flags on ohter than T_DATA are reserved [Misc #18059] 2021-09-24 19:23:15 +09:00
fiveNinePlusR 105e037fe8 [rubygems/rubygems] Fix possible malicious website to example.com
example.com is the canonical stand in for domain examples and will never have a backing website.

via https://www.rfc-editor.org/rfc/rfc2606.html

https://github.com/rubygems/rubygems/commit/26622c81c2
2021-09-22 10:14:04 +09:00
Samuel Williams 4730a1e0ec Don't describe C function that does not exist in prior versions. 2021-09-20 22:07:34 +12:00
Samuel Williams 649c87bd86 Add C interface spec. 2021-09-20 18:30:51 +12:00
Jose Galisteo b45fe48fbb
[rubygems/rubygems] Trigger install command by default on remove
Closes https://github.com/rubygems/rubygems/issues/4889

https://github.com/rubygems/rubygems/commit/2b1754479c
2021-09-17 20:46:18 +09:00
Nobuyoshi Nakada fd918d1afa
Removed Module.allocate [Bug #17048] 2021-09-17 11:14:08 +09:00
Nobuyoshi Nakada 8f41c791b1
Add spec for MatchData#match and MatchData#match_length [Feature #18172] 2021-09-17 10:27:00 +09:00
Jean Boussier 89242279e6 Marshal.load: do not call the proc until strings have their encoding
Ref: https://bugs.ruby-lang.org/issues/18141
2021-09-15 08:00:18 +09:00
Nobuyoshi Nakada e802587433
Add printf attribute to functions call va_list format functions 2021-09-12 14:05:52 +09:00
卜部昌平 f752382688 spec/ruby/optional/capi/ext: must support GCC 5
What a silly bug.
2021-09-10 20:00:06 +09:00
卜部昌平 b0f0120267 spec/ruby/optional/capi/ext: support ruby < 3
RBIMPL_WARNING_PUSH is a 3.0 feature.  Rubyspec OTOH has to support 2.x.
2021-09-10 20:00:06 +09:00
卜部昌平 b563b9c48f spec/ruby/optional/capi/ext: suppress warnings
These warnings are okay here.
2021-09-10 20:00:06 +09:00
Benoit Daloze 258661409e Update to ruby/spec@b1e93a2 2021-09-07 19:01:07 +02:00
Benoit Daloze a375640ea5 Update to ruby/mspec@e768949 2021-09-07 19:01:03 +02:00
David Rodríguez 4bc87cb1fb [rubygems/rubygems] Remove `syck` traces from `bundler`
Same reason as in the previous commit.

https://github.com/rubygems/rubygems/commit/f00a6c8516
2021-08-31 19:06:14 +09:00
David Rodríguez c119dd2b5a [rubygems/rubygems] Fix `bundle plugin install` misdetection of installed versions
https://github.com/rubygems/rubygems/commit/9c88db949d
2021-08-31 19:06:14 +09:00
David Rodríguez 71b937d3d7 [rubygems/rubygems] Normalize setting `GEM_PATH`
https://github.com/rubygems/rubygems/commit/4188ebd568
2021-08-31 19:06:14 +09:00
David Rodríguez f934096638 [rubygems/rubygems] Make plugin installation idempotent
The error had not be caught be specs because `bundle install` was
returning a zero exit code when plugin installation errors happened. So
I fixed that issue too.

https://github.com/rubygems/rubygems/commit/90cde87856
2021-08-31 19:06:14 +09:00
Matt Larraz 2aed061384 [rubygems/rubygems] Correctly redact credentials when using x-oauth-basic
https://github.com/rubygems/rubygems/commit/290b6ab078
2021-08-31 19:06:14 +09:00
David Rodríguez f6803d2411 [rubygems/rubygems] Fix `bundle check` showing duplicated gems
If the lockfile contains multiple platforms, `bundle check` would show
duplicated missing gems.

https://github.com/rubygems/rubygems/commit/6ac5931783
2021-08-31 19:06:14 +09:00
David Rodríguez 3683781f53 [rubygems/rubygems] Restore working `bundle check` behaviour
As part of a recent bug fix where bundler was accidentally hitting the
network when not supposed to, I made some refactoring, and the commit I'm
reverting here
(d74830d00b)
was some cleanup that those refactorings allowed according to "past me".

That was completely wrong, `bundle check` should never consider cached
gems, only installed gems, so the code that was removed was necessary.

https://github.com/rubygems/rubygems/commit/5483e98305
2021-08-31 19:06:14 +09:00
Jun Aruga 71f6711351 [rubygems/rubygems] Fix some failing Bundler tests with old Git.
Use the `git branch --list` rather than the `git branch -l` for better
compatibility. Because the `git branch -l` is used to create a new branch in
Git version < 2.20.0.

https://github.com/rubygems/rubygems/commit/eac5be7d06
2021-08-31 19:06:14 +09:00
David Rodríguez 21db5876ca [rubygems/rubygems] Respect `BUNDLE_USER_HOME` for global config location
https://github.com/rubygems/rubygems/commit/58fc31442f
2021-08-31 19:06:14 +09:00
David Rodríguez ea16a0df80 [rubygems/rubygems] Disable `RUBYGEMS_GEMDEPS` for bundler spec run
Running `bundler` specs using `bundler` is not supported.

https://github.com/rubygems/rubygems/commit/cc97b6773d
2021-08-31 19:06:14 +09:00
David Rodríguez 5aee962fe3 [rubygems/rubygems] Remove `RUBYGEMS_GEMDEPS` warning
When setting the `RUBYGEMS_GEMDEPS` environment variable to allow
skipping `bundle exec`, `bundler` will print a warning about potential
incompatibility.

Initially the `RUBYGEMS_GEMDEPS` variable used a completely different
(re)implementation of `bundler` functionality. That implementation was
not battle tested and could potentially differ in behaviour from what
`bundler` does. That's why print a warning.

However, these days, all `rubygems` does when `RUBYGEMS_GEMDEPS` is set
is to require `bundler/setup`, so there's no risk of any
incompatibility, since that's just plain `bundler`.

https://github.com/rubygems/rubygems/commit/bbddc27016
2021-08-31 19:06:14 +09:00
David Rodríguez ab1edc75f8 [rubygems/rubygems] Expect the right permissions on Windows
Given Windows doesn't have executable bit.

https://github.com/rubygems/rubygems/commit/35dc3fa845
2021-08-31 19:06:14 +09:00
David Rodríguez 8adc606271 [rubygems/rubygems] Fix git repo initialization on a path with spaces
https://github.com/rubygems/rubygems/commit/a2d6e10192
2021-08-31 19:06:14 +09:00
David Rodríguez 199083dd15 [rubygems/rubygems] Simplify overkill usage of shared examples
https://github.com/rubygems/rubygems/commit/36a00144b9
2021-08-31 19:06:14 +09:00
David Rodríguez 10dcd0eb5b [rubygems/rubygems] Deprecate `bundle exec --no-keep-file-descriptors`
https://github.com/rubygems/rubygems/commit/591466d512
2021-08-31 19:06:14 +09:00
Nobuyoshi Nakada 9fc16a31d9 [rubygems/rubygems] Exclude gemspec file itself from gem
The processed YML data is included as metadata, the source gemspec
file is unused and just confusing.

https://github.com/rubygems/rubygems/commit/f444478eac
2021-08-31 19:06:14 +09:00
Tim Sutton d7c734a27e [rubygems/rubygems] typos in UI messages: fix a couple missing spaces between sentence breaks
https://github.com/rubygems/rubygems/commit/5cdda53382
2021-08-31 19:06:14 +09:00
David Rodríguez 0e01ad881a [rubygems/rubygems] The `--local` flag to `bundle install` shouldn't hit the network
If the cache was missing, `bundler` would try to re-fetch it. With the
`--local` flag, it should just look at installed gems.

https://github.com/rubygems/rubygems/commit/630d29c69e
2021-08-31 19:06:14 +09:00
David Rodríguez 7116ec6199 [rubygems/rubygems] Requiring `bundler/setup` shouldn't try to hit the network
https://github.com/rubygems/rubygems/commit/06f5efce02
2021-08-31 19:06:14 +09:00
David Rodríguez 0b4dbe2e6a [rubygems/rubygems] Improve "gem not found in source" errors
When printing sources inside these error messages, it's useful to only
consider the current state of the source. For example, when requiring
`bundler/setup`, the source shouldn't be configured to be able to hit
the network, so the error message should only mention "locally installed
gems" to make that more clear.

https://github.com/rubygems/rubygems/commit/30eb14f853
2021-08-31 19:06:14 +09:00
David Rodríguez b17cdad2f8 [rubygems/rubygems] Remove redundant part of error message
It doesn't really add much, in my opinion. We want to be helpful, but
also concise when possible.

https://github.com/rubygems/rubygems/commit/9d56009cf7
2021-08-31 19:06:14 +09:00
David Rodríguez f1c0729128 [rubygems/rubygems] Fix standalone generated script to deal with path sources
In the case of path sources, the path the source is pointing to should
be added directly to the `$LOAD_PATH` without any modifications.

https://github.com/rubygems/rubygems/commit/d3bba936f0

Co-authored-by: Daniel Niknam <mhmd.niknam@gmail.com>
2021-08-31 19:06:14 +09:00
David Rodríguez 7465b94f8a [rubygems/rubygems] Remove unnecessary `ruby_version` local variable
Under some case, this variable might not end up being used, in which
case running the script would print unused variable warnings.

https://github.com/rubygems/rubygems/commit/bf96030362
2021-08-31 19:06:14 +09:00
David Rodríguez 3aa087d533 [rubygems/rubygems] Remove unnecessary `ruby_engine` local variable
Under some case, this variable might not end up being used, in which
case running the script would print unused variable warnings.

https://github.com/rubygems/rubygems/commit/a2d6392ada
2021-08-31 19:06:14 +09:00
David Rodríguez 1d6551a02d [rubygems/rubygems] Remove unnecessary `path` local variable
We can use `__dir__` directly.

https://github.com/rubygems/rubygems/commit/0e6083ca94
2021-08-31 19:06:14 +09:00
David Rodríguez 0ab160e2e0 [rubygems/rubygems] Respect `BUNDLE_USER_CONFIG` if set
https://github.com/rubygems/rubygems/commit/f28ab141af
2021-08-31 19:06:14 +09:00
David Rodríguez c2f376bcc0 [rubygems/rubygems] Fix standalone install of default gems
Rubygems source replacement was broken.

https://github.com/rubygems/rubygems/commit/3549c122f6
2021-08-31 19:06:14 +09:00
David Rodríguez 9e7249da4e [rubygems/rubygems] This spec can pass now on ruby 3
TSort was released as a library so we can install it, and also other
gems that are loaded by the spec. Also, Ruby on Windows apparently loads
fiddle 1.0.6, so we need to also install that to make that not fail.

https://github.com/rubygems/rubygems/commit/2b8dcab99e
2021-08-31 19:06:14 +09:00
David Rodríguez 579dbe6ecb [rubygems/rubygems] Remove unnecessary test repository
These gems are built and installed to system directly as default gems.
There's no need to also build a remote repo.

https://github.com/rubygems/rubygems/commit/ad9dad4c22
2021-08-31 19:06:14 +09:00
David Rodríguez 570167eaa9 [rubygems/rubygems] Give a `bundle install` hint when `bundle list` fails
https://github.com/rubygems/rubygems/commit/98f5087e34
2021-08-31 19:06:14 +09:00
David Rodríguez 81c0643762 [rubygems/rubygems] Remove unnecessary escape sequences
Bundler formatters already take care of this.

https://github.com/rubygems/rubygems/commit/c24415fdd5
2021-08-31 19:06:14 +09:00
David Rodríguez 9a25a98c6b [rubygems/rubygems] Show all missing gems when using a bundle before installing it
Not only the first one that's missing.

This also allows us to simplify things.

https://github.com/rubygems/rubygems/commit/69718a9509
2021-08-31 19:06:14 +09:00
Nobuyoshi Nakada be9cc6c758
Fix rubyspec_capiext dependency and flags
- The file needed to link may be the import library.
- Remove duplicate flags.
2021-08-30 12:03:44 +09:00
Nobuyoshi Nakada 9f9ea28375
Fix dllimport attribute 2021-08-30 00:52:16 +09:00
Nobuyoshi Nakada d574b84182
Fix failures on non-UTF-8 environment [Bug #18077]
Call `IOSpecs.io_fixture` with the default encoding explicitly.
`IOSpecs.closed_io` calls the method without optional `mode` which
is set to UTF-8 by default, while the default external encoding
depends on the locale environment variables.
2021-08-22 12:11:45 +09:00
Lars Kanis 6594623f62 Fix Marshal.dump(closed_io) to raise TypeError and allow encoding on closed IO
Mashalling a closed IO object raised "closed stream (IOError)" before instead of TypeError.
This changes IO#(in|ex)ternal_encoding to still return the encoding even if the underlying FD is closed.

Fixes bug #18077
2021-08-22 10:33:22 +09:00
Jeremy Evans 48c8df9e0e
Allow tracing of optimized methods
This updates the trace instructions to directly dispatch to
opt_send_without_block.  So this should cause no slowdown in
non-trace mode.

To enable the tracing of the optimized methods, RUBY_EVENT_C_CALL
and RUBY_EVENT_C_RETURN are added as events to the specialized
instructions.

Fixes [Bug #14870]

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2021-08-21 10:15:01 -07:00
Kazuki Tsujimoto f96c199449
Fix test failure on spec/ruby/language/pattern_matching_spec.rb
https://github.com/ruby/ruby/runs/3369486308
2021-08-19 17:28:30 +09:00
Kazuki Tsujimoto ecb6d6a4ef
Allow omission of parentheses in one line pattern matching [Feature #16182] 2021-08-19 17:07:58 +09:00
Benoit Daloze 73085c8d8e Update to ruby/spec@330c641 2021-08-13 18:09:14 +02:00
S.H 9b3fcfbbb9
Suppress unused-result warnings
* Hide read function warning in string_spec_RSTRING_PTR_read function

* The type of `read` may be `ssize_t`

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2021-08-07 12:50:55 +09:00
Benoit Daloze ff6c176028 Tweak rb_str_modify_expand() + read() spec to try to find out why it fails on some platforms
* Use a longer string as <= 23 characters it's embedded on CRuby and
  the value of rb_str_capacity() is implementation-specific.
2021-07-30 11:36:20 +02:00
Jeremy Evans 64ac984129 Make RubyVM::AbstractSyntaxTree.of raise for method/proc created in eval
This changes Thread::Location::Backtrace#absolute_path to return
nil for methods/procs defined in eval.  If the realpath of an iseq
is nil, that indicates it was defined in eval, in which case you
cannot use RubyVM::AbstractSyntaxTree.of.

Fixes [Bug #16983]

Co-authored-by: Koichi Sasada <ko1@atdot.net>
2021-07-29 13:51:03 -07:00
Benoit Daloze 6998d75824 Update to ruby/spec@b65d01f 2021-07-29 22:11:21 +02:00
Benoit Daloze 15d05f8120 Update to ruby/mspec@9542a88 2021-07-29 22:11:19 +02:00
Hiroshi SHIBATA c3d31377b3
Bump unicode version for Ruby 3.1 2021-07-27 18:00:32 +09:00
Daniel Niknam bd8daa8523
[rubygems/rubygems] Remove the warning for not defining a gem server source
Bundler has deprecated gemfiles without a global source and this feature
is now obsolete. `Bundler::Definition#has_rubygems_remotes?` is removed
because it's not used anymore.

https://github.com/rubygems/rubygems/commit/d29dd2cb7b
2021-07-27 09:25:57 +09:00
Daniel Niknam 49176e8c8c
[rubygems/rubygems] Refactor Bundler::Dsl#check_rubygems_source_safety to improve readability
`check_rubygems_source_safety` is responsible for:

1. if there are multiple global sources
  - for bundle 3.x raise an error
  - for bundle 2.x print a warning
2. print a warning if there is no explicit global source

The second responsibility was added recently and now the logic could be
extracted to improve readability. Conditions are still live in the `check_rubygems_source_safety` method
since we don't want to call both functions always and that would help us achieve that.

https://github.com/rubygems/rubygems/commit/f3d7e946ee
2021-07-27 09:25:57 +09:00
Daniel Niknam 1ef360230e
[rubygems/rubygems] Deprecate Gemfile without an explicit global source
Raise a warning when parsing a Gemfile and it doesn't have a global source. Gemfiles like this, specially now that rubygems sources are are no longer merged into a single source for security, are very confusing because they generate a different lockfile depending on the gems you have locally installed. This is because bundler always use an implicit global source that defaults to locally installed gems.

https://github.com/rubygems/rubygems/commit/b7523ad21c
2021-07-27 09:25:57 +09:00
Daniel Niknam 2f9e0cf181
[rubygems/rubygems] Explicitly define a global source for tests
This is in preparation for deprecating source-less gemfiles.

https://github.com/rubygems/rubygems/commit/d6493fa3e2
2021-07-27 09:25:57 +09:00
Daniel Niknam b500e8fab4
[rubygems/rubygems] Implement Bundler::SourceList#implicit_global_source?
This method is created to tell whether any global source exist in the object or not and it will be used by `Bundler:Dsl` to print a warning if no global source has been defined in the Gemfile.

https://github.com/rubygems/rubygems/commit/422fec4438
2021-07-27 09:25:57 +09:00
Daniel Niknam 91a3f06e98
[rubygems/rubygems] Implement Bundler::Source::Rubygems#no_remotes?
This method is created to tell whether any remote exist in the object or not and it will be used by `Bundler:SourceList` to tell if a global source has been defined implicitly or not.

https://github.com/rubygems/rubygems/commit/47e3ff0e47
2021-07-27 09:25:56 +09:00
David Rodríguez 9ac89fe35e
[rubygems/rubygems] The `--quiet` should still display warnings
The is the previous intentional behaviour until
ca0676cb1c.

In my opinion, that previous behaviour was better and should be
restored, because we want our users to always see warnings and fix them.
And the original issue that motivated the change is fixable by other
means, namely through `BUNDLE_SILENCE_ROOT_WARNING`, or through
`BUNDLE_SILENCE_DEPRECATIONS` in general. Finally, the --quiet option is
still documented as "only print errors and warnings".

So this PR essentially reverts
ca0676cb1c
for the above reasons.

https://github.com/rubygems/rubygems/commit/35f2254dfc
2021-07-27 09:25:56 +09:00
David Rodríguez 24aca87def
[rubygems/rubygems] Make `--quiet` spec independent on the specific warning
We'll be removing the warning about no gem sources, so this spec will no
longer test that warnings are hidden by `--quiet`.

Test that in another way so that we don't lose the coverage when we
drop the specific warning about no gem server sources.

https://github.com/rubygems/rubygems/commit/cce4f86d28
2021-07-27 09:25:56 +09:00
David Rodríguez 6bcedabfdd
[rubygems/rubygems] Remove `gem install` hint when installing a gem fails
A fresh `gem install` might not reproduce the exact `bundle install`
environment that originally caused the error. It also makes it harder
for the user to troubleshoot the error since she needs to run a separate
command.

Instead, show the original error and backtrace directly.

https://github.com/rubygems/rubygems/commit/49c2abfec6
2021-07-27 09:25:55 +09:00
David Rodríguez 4271f4aea5
[rubygems/rubygems] Fix bundler binstub version selection
To mimic built-in rubygems behaviour, only thing that should be
approximated is the lockfile version. Other alternatives like
`BUNDLER_VERSION` should be respected exactly.

https://github.com/rubygems/rubygems/commit/dbd667d4bc
2021-07-27 09:25:55 +09:00
Daniel Niknam 90899c50c2
[rubygems/rubygems] Remove LoadError message in regards to requiring a relative file
Ruby 1.9.2 removed "." from LOAD_PATH for robustness and security reasons.
This code was introduced by 56fc830e19 commit
to helping users understand the issue and had a guard condition to include the message for `RUBY_VERSION >= "1.9"`.
However, the guard condition was removed as part of the "Ruby version leftover" cleanup by
8c9cf76e41

Ruby 1.9 development was ended a long time ago and this message is not useful anymore.

https://github.com/rubygems/rubygems/commit/a23609b15a
2021-07-27 09:25:55 +09:00
Andrew Haines 705b1bdef2
[rubygems/rubygems] Fix interrupt handling in Bundler workers
The existing interrupt handling using `SharedHelpers.trap` fails when the previous
handler for a signal is not callable (for example, when it is the string "DEFAULT").

Instead, we now handle interrupts by aborting the process when worker threads are
running, and restore the previous handler after worker threads are finished.

Fixes #4764.

https://github.com/rubygems/rubygems/commit/b9f455d487
2021-07-27 09:25:55 +09:00
Benoit Daloze c8172d0b96 rb_iterate is no longer used in ruby/spec 2021-07-26 13:24:38 +02:00
Nobuyoshi Nakada 42745ecae3
Remove meaningless IO#close_on_exec= spec [Feature #17745] 2021-07-20 21:45:11 +09:00
Nobuyoshi Nakada e0e12202c7
Use rb_block_call() instead of the deprecated rb_iterate() 2021-07-18 11:40:21 +09:00
Kazuhiro NISHIYAMA f11f9fc921
Disable spec of `pattern matching is experimental` since 3.1 2021-07-17 13:24:23 +09:00
Kazuhiro NISHIYAMA 2a5b5ff49a
Fix a spec failure
```
1)
Warning.[]= :experimental emits and suppresses warnings for :experimental FAILED
Expected "" =~ /is experimental/
to be truthy but was nil
```
2021-07-17 13:24:08 +09:00
Kazuhiro NISHIYAMA 503fa1620c
Fix a spec failure
```
1)
The -W command line option with :no-experimental suppresses experimental warnings FAILED
Expected "" =~ /is experimental/
to be truthy but was nil
```
2021-07-17 13:16:48 +09:00
Nobuyoshi Nakada 301d194ee3 Add Integer.try_convert [Feature #15211] 2021-07-16 17:49:53 +09:00
David Rodríguez 71d3c9bbfa
[rubygems/rubygems] Fix `bundle plugin install --help` showing `bundle install`'s help
https://github.com/rubygems/rubygems/commit/b7b7d16aa8
2021-07-16 15:40:08 +09:00