Commit graph

61609 commits

Author SHA1 Message Date
David Rodríguez
f02f19d62f [rubygems/rubygems] Rewrite dependency API specs to use new deployment mode
Some of them were passing "by chance" because they used a `bundle
install` command that failed, but the assertion was using the result of
the previous. Others were skipped on bundler 3. Now they all pass in all
versions.

cedf611e11
2020-06-05 07:32:42 +09:00
David Rodríguez
5c924f597f [rubygems/rubygems] Make forgotten_command_line_options always "forget" options
4d39338670
2020-06-05 07:32:42 +09:00
David Rodríguez
99dc55987d [rubygems/rubygems] Improve specs testing option remembering behavior
By making them more explicit.

9979c5a811
2020-06-05 07:32:42 +09:00
David Rodríguez
b2a460ea3e [rubygems/rubygems] Centralize with and without setting
5e854722e2
2020-06-05 07:32:42 +09:00
David Rodríguez
9422162f71 [rubygems/rubygems] Remove redundant substraction
365b46329b
2020-06-05 07:32:42 +09:00
David Rodríguez
97d05c9db3 [rubygems/rubygems] Remove unnecessary option mutation
744c03d144
2020-06-05 07:32:42 +09:00
David Rodríguez
332ecb0ad1 [rubygems/rubygems] Fix bundle install unintentionally saving configuration
Even if no explicit flags were passed to it.

0598cbb68c
2020-06-05 07:32:42 +09:00
David Rodríguez
6b7a0c0ca7 [rubygems/rubygems] Move all without and with option handling together
5e47879330
2020-06-05 07:32:42 +09:00
David Rodríguez
052d66050a [rubygems/rubygems] Change descriptions to not mention deprecated flags
731b3783f1
2020-06-05 07:32:42 +09:00
David Rodríguez
fed9419e55 [rubygems/rubygems] Fix flag name in spec descriptions
6395392b83
2020-06-05 07:32:42 +09:00
David Rodríguez
5989827dc7 [rubygems/rubygems] Improve wording of some specs
3372b21553
2020-06-05 07:32:42 +09:00
David Rodríguez
ff74725dc3 [rubygems/rubygems] Remove old no longer meaningful spec
This spec was originally written many years ago to verity gems were
properly "remembered" in the lock file. At this point, the test feels a
bit dummy since the first `bundle install` already runs on a "clean
machine".

dbfefb3f5a
2020-06-05 07:32:42 +09:00
David Rodríguez
09602f4301 [rubygems/rubygems] Revert multi ruby{,gems} version requirement fix
This reverts commit 20f06d9e178211a3016133852b72d21ac7bb93ad, reversing
changes made to f2b30cb70df8a518bef0e8a64bbceb86234d922d.

40802bdb18
2020-06-05 07:32:42 +09:00
David Rodríguez
592762069d [rubygems/rubygems] Support running specs against a tarball
When bundler specs are run from a ruby tarball (ruby-core does this),
there's no git folder, so `git ls-files` fails.

Support this case by making specs rely on the list of files from the
bundler gemspec instead, and invert the spec that makes sure we ship the
right set of files.

As per the other quality specs, skip them in this case.

b28d5ec931
2020-06-05 07:32:42 +09:00
David Rodríguez
bd9a6ba4ef [rubygems/rubygems] Remove unintended extra space
1cc02930f3
2020-06-05 07:32:42 +09:00
Hiroshi SHIBATA
9f7bfba54f Revert "Fix a error in a before(:suite) hook"
This reverts commit 67d2a715ca.
2020-06-05 07:32:42 +09:00
Hiroshi SHIBATA
1ab410caf8 Revert "Fix a failure in bundle version with version outputs the version with build metadata"
This reverts commit fcc8be0198.
2020-06-05 07:32:42 +09:00
David Rodríguez
1161191a2a [rubygems/rubygems] Test against compact_index 0.13.0
9f15b595ab
2020-06-05 07:32:42 +09:00
David Rodríguez
735bd501e7 [rubygems/rubygems] Bump compact_index to 0.12.1
08374d0e4a
2020-06-05 07:32:42 +09:00
David Rodríguez
d52b1b0705 [rubygems/rubygems] Deprecate the --no-deployment flag
And never recommend it inside CLI messages.

This flag represents the default behaviour of `bundle install`, and the
only reason it exists is to "override" previous `--deployment` flag
usages which were silently remembered. So it should be deprecated just
like all the other flags the rely on remembering their values across
invocations.

40e50b7190
2020-06-05 07:32:42 +09:00
David Rodríguez
97267227bb [rubygems/rubygems] Don't recommend the --no-deployment flag
b368c7e0c4
2020-06-05 07:32:42 +09:00
David Rodríguez
1914c4e9b1 [rubygems/rubygems] Pass --deployment flag directly
This spec is run only in bundler 2 mode, and it's testing the
`--deployment` flag specifically.

a5d91c68b6
2020-06-05 07:32:42 +09:00
David Rodríguez
5a12fc7c7f [rubygems/rubygems] Unskip "monorepo issues"
They seem to be passing?

a00d1e6896
2020-06-05 07:32:42 +09:00
David Rodríguez
5c343b849b [rubygems/rubygems] June man pages
cea610e197
2020-06-05 07:32:42 +09:00
Nobuyoshi Nakada
a9e0046c26
Moved vm_empty_cc to local in vm.c [Bug #16934]
Missed to commit a staged change.
2020-06-04 17:13:56 +09:00
Nobuyoshi Nakada
8b22fd27f1
Moved vm_empty_cc to local in vm.c [Bug #16934]
As it is referenced only from compile.c, except for MJIT, simply
use the accessor function.
2020-06-04 17:06:10 +09:00
Nobuyoshi Nakada
33ca2d386b
Removed no longer used constants [Bug #16934]
`RESERVED_HASH_VAL` and `RESERVED_HASH_SUBSTITUTION_VAL` have not
been used directly in hash.c since 72825c35b0.
2020-06-04 17:00:52 +09:00
Nobuyoshi Nakada
2b7454eb92
Update leaked-globals [Bug #16934]
* match uppercase types which would be global, other than [BDT]
* ignore `RUBY_` prefixed symbols
2020-06-04 17:00:52 +09:00
Nobuyoshi Nakada
047471c529
No GITPULLOPTIONS by default
To honor the environment variable, keep GITPULLOPTIONS unset by
default, and appended the option to VCSUP.
2020-06-04 13:16:24 +09:00
Yusuke Endoh
3d71388710 test/socket/test_addrinfo.rb: Fix syntax error
Sorry!
2020-06-04 11:29:39 +09:00
Yusuke Endoh
980655ce83 test/socket/test_addrinfo.rb: Suppress Errno::EACCES when addr is in use
MinGW seems to raise Errno::EACCES instead of EADDRINUSE when bind fails
due to in use.

736825846
```
  2) Error:
TestSocketAddrinfo#test_connect_from:
Errno::EACCES: Permission denied - bind(2) for 0.0.0.0:49721
    D:/a/ruby/ruby/build/.ext/common/socket.rb:54:in `bind'
    D:/a/ruby/ruby/build/.ext/common/socket.rb:54:in `connect_internal'
    D:/a/ruby/ruby/build/.ext/common/socket.rb:114:in `connect_from'
    D:/a/ruby/ruby/src/test/socket/test_addrinfo.rb:379:in `block in test_connect_from'
    D:/a/ruby/ruby/src/test/socket/test_addrinfo.rb:374:in `open'
    D:/a/ruby/ruby/src/test/socket/test_addrinfo.rb:374:in `test_connect_from'
```
2020-06-04 11:24:19 +09:00
Nobuyoshi Nakada
923e02a6a1
No one reads the detached head advice 2020-06-04 09:09:51 +09:00
Nobuyoshi Nakada
f6acbf7679
Fetch no tags
Fetched tags by `make up` are not used, in CI environments.
2020-06-04 09:09:51 +09:00
Nobuyoshi Nakada
1ce40e3b29
Removed fetch-depth
Only the last commit is used, unless creating the ChangeLog file.
2020-06-04 09:09:51 +09:00
Burdette Lamar
e2d76478db
Enhanced Rdoc for Hash (#3178)
* Enhanced Rdoc for Hash

* Fix typo in Hash Rdoc

* Enhanced Rdoc for Hash
2020-06-03 18:53:56 -05:00
Nobuyoshi Nakada
184f78314e Properly resolve refinements in defined? on private call [Bug #16932] 2020-06-04 02:12:57 +09:00
Nobuyoshi Nakada
8340c773e5 Properly resolve refinements in defined? on method call [Bug #16932] 2020-06-04 02:12:57 +09:00
git
3ced77a82a * 2020-06-04 [ci skip] 2020-06-04 01:51:00 +09:00
Jeremy Evans
98286e9850 Ensure origins for all included, prepended, and refined modules
This fixes various issues when a module is included in or prepended
to a module or class, and then refined, or refined and then included
or prepended to a module or class.

Implement by renaming ensure_origin to rb_ensure_origin, making it
non-static, and calling it when refining a module.

Fix Module#initialize_copy to handle origins correctly.  Previously,
Module#initialize_copy did not handle origins correctly.  For example,
this code:

```ruby
module B; end
class A
  def b; 2 end
  prepend B
end
a = A.dup.new
class A
  def b; 1 end
end
p a.b
```

Printed 1 instead of 2.  This is because the super chain for
a.singleton_class was:

```
a.singleton_class
A.dup
B(iclass)
B(iclass origin)
A(origin) # not A.dup(origin)
```

The B iclasses would not be modified, so the includer entry would be
still be set to A and not A.dup.

This modifies things so that if the class/module has an origin,
all iclasses between the class/module and the origin are duplicated
and have the correct includer entry set, and the correct origin
is created.

This requires other changes to make sure all tests still pass:

* rb_undef_methods_from doesn't automatically handle classes with
  origins, so pass it the origin for Comparable when undefing
  methods in Complex. This fixed a failure in the Complex tests.

* When adding a method, the method cache was not cleared
  correctly if klass has an origin.  Clear the method cache for
  the klass before switching to the origin of klass.  This fixed
  failures in the autoload tests related to overridding require,
  without breaking the optimization tests.  Also clear the method
  cache for both the module and origin when removing a method.

* Module#include? is fixed to skip origin iclasses.

* Refinements are fixed to use the origin class of the module that
  has an origin.

* RCLASS_REFINED_BY_ANY is removed as it was only used in a single
  place and is no longer needed.

* Marshal#dump is fixed to skip iclass origins.

* rb_method_entry_make is fixed to handled overridden optimized
  methods for modules that have origins.

Fixes [Bug #16852]
2020-06-03 09:50:37 -07:00
Nobuyoshi Nakada
ee35a4dad3
Append subsec part instead of creating new string 2020-06-03 19:13:36 +09:00
Benoit Daloze
160511d851 Quarantine specs which fail frequently with CHECK_LEAKS=true 2020-06-03 12:11:58 +02:00
Nobuyoshi Nakada
eb2b7fca43
Fixed up 56ca006784
Run lldb just before sending ABRT or KILL signal.  Some tests
terminate child processes by TERM signal intentionally.
2020-06-03 17:28:15 +09:00
卜部昌平
de5e0f7c06 vm_invoke_proc_block: reduce recursion
According to nobu recursion can be longer than my expectation.  Limit
them here.
2020-06-03 16:13:47 +09:00
卜部昌平
b61e82eac9 vm_call_symbol: check stack overflow
VM stack could overflow here.  The condition is when a symbol is passed
to a block-taking method via &variable, and that symbol has never been
used for actual method names (thus yielding that results in calling
method_missing), and the VM stack is full (no single word left).  This
is a once-in-a-blue-moon event.  Yet there is a very tiny room of stack
overflow.  We need to check that.
2020-06-03 16:13:47 +09:00
卜部昌平
ba20e6080d vm_invoke_block: remove auto qualifier
Was (harmless but) redundant.
2020-06-03 16:13:47 +09:00
卜部昌平
d4015cfee3 add benchmark for different block handlers 2020-06-03 16:13:47 +09:00
卜部昌平
6302b96368 vm_insnhelper.c: add space [ci skip]
Just cosmetic change to improve readability.
2020-06-03 16:13:47 +09:00
卜部昌平
054c2fdfdf vm_invoke_symbol_block: reduce MEMCPY
This commit changes the number of calls of MEMCPY from...

                           | send  | &:sym
  -------------------------|-------|-------
   Symbol already interned | once  | twice
   Symbol not pinned yet   | none  | once

to:

                           | send  | &:sym
  -------------------------|-------|-------
   Symbol already interned | once  | none
   Symbol not pinned yet   | twice | once

So it sacrifices exceptional situation for normal path.
2020-06-03 16:13:47 +09:00
卜部昌平
36322942db vm_invoke_symbol_block: call vm_call_opt_send
Symbol#to_proc and Object#send are closely related each other.  Why not
share their implementations.  By doing so we can skip recursive call of
vm_exec(), which could benefit for speed.
2020-06-03 16:13:47 +09:00
卜部昌平
973883aaa1 vm_invoke_block: force indirect jump
This changeset slightly speeds up on my machine.

Calculating -------------------------------------
                                       before                 after
Optcarrot Lan_Master.nes    38.33488426546287     40.89825082589147 fps
                            40.91288557922081     41.48687465359386
                            40.96591995270991     41.98499064664184
                            41.20461943032173     43.67314690779162
                            42.38344888176518     44.02777536251875
                            43.43563728880915     44.88695892714136
                            43.88082889062643     45.11226186242523
2020-06-03 16:13:47 +09:00