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

1699 Коммитов

Автор SHA1 Сообщение Дата
Jeremy Evans d8dfabbfe6 Fix spec description
Co-authored-by: Benoit Daloze <eregontp@gmail.com>
2022-03-29 18:14:33 -07:00
Jeremy Evans 9c1d32a7ad Make TracePoint#enable with block target current thread by default
If TracePoint#enable is passed a block, it previously started
the trace on all threads.  This changes it to trace only the
current thread by default.  To limit the scope of the change,
the current thread is only used by default if target and
target_line are both nil.  You can pass target_thread: nil
to enable tracing on all threads, to get the previous
default behavior.

Fixes [Bug #16889]
2022-03-29 18:14:33 -07:00
Benoit Daloze 8db4f25bf4 Update to ruby/spec@aaf998f 2022-03-28 17:47:04 +02:00
Jeremy Evans 343ea9967e Raise RuntimeError if Kernel#binding is called from a non-Ruby frame
Check whether the current or previous frame is a Ruby frame in
call_trace_func before attempting to create a binding for the frame.

Fixes [Bug #18487]

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2022-03-24 12:31:07 -07:00
David Rodríguez 39606a774e [rubygems/rubygems] Maybe this is now fixed
https://github.com/rubygems/rubygems/commit/d9c442e54c
2022-03-24 20:22:00 +09:00
Nobuyoshi Nakada 1357b14750
Now all extension libraries must consider the ABI header 2022-03-24 08:59:24 +09:00
Jun Aruga 1ff174bfd1 [rubygems/rubygems] Fix a test for `bin/bundle update --bundler` to pass on ruby/ruby.
Consider the case that the latest Bundler version on RubyGems is higher than
the `system_bundler_version` (= `Bundler::VERSION`) in `make test-bundler` on
ruby/ruby.

See <https://bugs.ruby-lang.org/issues/18643>.

https://github.com/rubygems/rubygems/commit/bfa2f72cfa
2022-03-23 00:01:17 +09:00
Benoit Daloze 1fd1f7bbfc Fix Markdown syntax in spec/README.md 2022-03-21 17:40:42 +01:00
Jeremy Evans b6804d62f8 Make Proc#parameters support lambda keyword for returning parameters as if lambda
This makes it easier to use Proc#parameters to build wrappers.

Implements [Feature #15357]
2022-03-17 11:52:02 -07:00
Nobuyoshi Nakada e660b934b9
A positional Hash is not keyword arguments [Bug #18632] 2022-03-17 20:53:41 +09:00
Yuta Saito e9553a8cac spec: skip specs where set TZ environment variable for WASI
WASI doesn't respect TZ env var for now
2022-03-17 17:44:41 +09:00
Yuta Saito 7023b3d394 spec: disable a part of Kernel.open spec where spawns a process for WASI
WASI doesn't provide a way to spawn a new process
2022-03-17 17:33:12 +09:00
Yuta Saito e499d32689 spec: disable part of require_relative spec where uses symlink for WASI
cap-std, an underlying sandbox implementation of WASI in wasmtime, doesn't
allow to create a symlink to an absolute path to enforce sandbox restriction.

See also: 257867a1d3
2022-03-17 12:26:19 +09:00
Yuta Saito b1bcad5e3a spec: skip '~' test for wasi due to lack of shell 2022-03-14 23:05:15 +09:00
Yuta Saito fe2e5c13f9 spec: skip ruby_exe tests for wasi due to lack of subprocess 2022-03-14 23:04:13 +09:00
Martin Dürst 267f0089d3 clarify meaning of version guards for Unicode version specs [ci skip] 2022-03-14 08:39:06 +09:00
Benoit Daloze 1b571d0abf Fix guards for unicode versions specs 2022-03-13 13:27:47 +01:00
Martin Dürst 45187a0fcd comment out failing Unicode/Emoji version checks temporarily 2022-03-13 10:52:24 +09:00
Martin Dürst 9b545b0caf update specs to check for Unicode Version 14.0.0/Emoji Version 14.0 2022-03-13 09:19:52 +09:00
Alex Gittemeier 943efa8ca6 [rubygems/rubygems] Add newline to validate_platforms! message when platform is missing
When I run bundle install with BUNDLE_DEPLOYMENT=true in the environment
on a different platform than I usually do development, I get the
following output to the console (wrapped exactly as shown):

Your bundle only supports platforms ["x86_64-darwin-19"] but your local platform
is x86_64-linux. Add the current platform to the lockfile with `bundle lock
--add-platform x86_64-linux` and try again.

Because the way the message wraps, its not as simple as copying the
suggested command to the clipboard because it contains a newline:

    $ bundle lock
    Writing lockfile to [...]/Gemfile.lock
    $ --add-platform x86_64-linux

Adding a newline right before the command forces the command in the
error message to be on the same line, which facilitates copy-pasting the
command in the message.

https://github.com/rubygems/rubygems/commit/4cf6989b11
2022-03-08 03:40:30 +09:00
David Rodríguez 156079a85d [rubygems/rubygems] Make `--strict` flag of `update` and `outdated` commands consistent
Previously they had slightly different behavior when combined with
conservative updating flags.

The correct behavior is the `--update-strict` option, so `--script` now
does that, The `--update-strict` option is left there for now but I will
deprecate it later.

https://github.com/rubygems/rubygems/commit/ab42046229
2022-03-06 22:17:00 +09:00
Nobuyoshi Nakada c757c4e054
sitelibdir makes no sense in ruby itself 2022-03-04 15:56:03 +09:00
Benoit Daloze 3b21818db1 Update to ruby/spec@82cd3a3 2022-03-03 14:43:14 +01:00
Benoit Daloze 1dc6bed0ca Update to ruby/mspec@bd47c2a 2022-03-03 14:43:11 +01:00
Yuta Saito bd1507b2f6 spec: skip ext's extension spec for --with-static-linked-ext
`resolve_feature_path` doesn't return .so when the given ext is linked
statically by --with-static-linked-ext
2022-02-28 17:59:33 +09:00
Hiroshi SHIBATA ff3d7b720e Merge RubyGems and Bundler master 2022-02-28 11:39:20 +09:00
Nobuyoshi Nakada e82f5db789
Deprecate the unintentional ability to parse `Symbol` 2022-02-26 02:42:35 +09:00
David Rodríguez 7b676b3ce3 [rubygems/rubygems] Fix corrupted lockfile when using `gemspec` and multiple sources
https://github.com/rubygems/rubygems/commit/9712262d90
2022-02-11 18:20:20 +09:00
Sven Schwyn a271acf822 [rubygems/rubygems] Fix typo in multiple gemfiles warning
https://github.com/rubygems/rubygems/commit/bc69d19097
2022-02-10 08:38:09 +09:00
Dan Jensen 0b2f6b942b [rubygems/rubygems] Skip "seller shipped" notification after delivery
If a Shipment has been delivered, there is no point in notifying the
buyer that the seller shipped. Instead, we should simply notify the
buyer that the shipment was delivered. This is relevant in cases where
the seller is late to mark a Shipment as shipped, so the first EasyPost
Tracker update marks it as delivered, or in cases where the seller
fails to mark as shipped and the buyer marks it as delivered.

This fixes a Shipment event handler so the buyer notification for
shipment is no longer invoked if the Shipment is already delivered.

https://github.com/rubygems/rubygems/commit/09c2cadc86
2022-02-01 20:07:18 +09:00
David Rodríguez 517d7c3221 Sync latest Bundler & RubyGems 2022-02-01 08:09:23 +09:00
Benoit Daloze e0c5488ff9 Update to ruby/spec@902ab83 2022-01-28 14:42:38 +01:00
Benoit Daloze bb5f710887 Update to ruby/mspec@49adc2f 2022-01-28 14:42:36 +01:00
David Rodríguez c925d3b668 [rubygems/rubygems] Fix `force_ruby_platform` ignored when lockfile includes the current specific platform
https://github.com/rubygems/rubygems/commit/9ca371adf8
2022-01-26 13:09:31 +09:00
Ngan Pham 42ef3fcaef [rubygems/rubygems] Use Gem::Platform.local instead of RUBY_PLATFORM
In certain places, we want to display the platform name with
`Gem::Platform.local` instead of `RUBY_PLATFORM`.

Fixes https://github.com/rubygems/rubygems/issues/5264

https://github.com/rubygems/rubygems/commit/bdd1848ae8
2022-01-26 02:24:30 +09:00
David Rodríguez 342e7a094a [rubygems/rubygems] Fix spec to not touch the network
And not depend on the state of rack's master branch, in particular, on
their Ruby support range.

https://github.com/rubygems/rubygems/commit/9ea4baffac
2022-01-25 22:12:33 +09:00
David Rodríguez cd806e19b7 [rubygems/rubygems] Remove unnecessary comment
https://github.com/rubygems/rubygems/commit/ef4e5c6169
2022-01-25 22:12:33 +09:00
Kazuhiro NISHIYAMA bb955096d8
Fix a typo [ci skip] 2022-01-23 21:56:39 +09:00
Yusuke Nakamura 7353f950c3 [rubygems/rubygems] Change generated namespaced test class name in minitest
* `foo` => `TestFoo`
* `foo_bar` => `TestFooBar`
* `foo-bar` => `Foo::TestBar`

https://github.com/rubygems/rubygems/commit/353cdd61c3
2022-01-20 01:04:53 +09:00
Yusuke Nakamura 26e0450ba9 [rubygems/rubygems] Add spec to class name definition in newgem spec
https://github.com/rubygems/rubygems/commit/5f698fc4a0
2022-01-20 01:04:53 +09:00
Yusuke Nakamura 4451313252 [rubygems/rubygems] Update generated minitest file style
foo     => test/test_foo.rb
foo-bar => test/foo/test_bar.rb
foo_bar => test/test_foo_bar.rb

https://github.com/rubygems/rubygems/commit/c795e5d40d
2022-01-20 01:04:52 +09:00
Yusuke Nakamura 4e955b2e37 [rubygems/rubygems] Create minitest file to underscored path in "bundle gem" command
...with dashed gem name

In "bundle gem" command with dashed name gem (e.g. foo-bar) generates
`test/test_foo/bar.rb`, but this file contains undefined class `TestFoo`
and moreover, does not include in "bundle exec rake test" target.

Therefore, intentially the first test after gem created is fail, but in
case of gem name contains dash character is not.

The change doings...
(when "bundle gem foo-bar" called)

* create `test/test_foo_bar.rb`
* define `TestFooBar` class in `test/test_foo_bar.rb`

https://github.com/rubygems/rubygems/commit/5d9a69fc0f
2022-01-20 01:04:52 +09:00
Hiroshi SHIBATA d22511fd75 Merge rubygems/rubygems HEAD.
Picked at 12aeef6ba9a3be0022be9934c1a3e4c46a03ed3a
2022-01-19 15:01:44 +09:00
David Rodríguez e7249294fb
[rubygems/rubygems] Fix regression with old marshaled specs having null required_rubygems_version
https://github.com/rubygems/rubygems/commit/91f07a0208
2022-01-19 11:20:36 +09:00
David Rodríguez 39c36a5cf4
[rubygems/rubygems] Fix skipped spec on Windows
https://github.com/rubygems/rubygems/commit/bf0f4b98ee
2022-01-19 11:20:36 +09:00
Kazuhiro NISHIYAMA 2dc365db79
Fix spec failures on ruby 3.1
Because Module#const_added is ruby 3.2 feature
2022-01-15 13:30:20 +09:00
Jeremy Evans a93cc3e23b Make Hash#shift return nil for empty hash
Fixes [Bug #16908]
2022-01-14 12:17:57 -08:00
Jeremy Evans ca3d405242 Fix constant assignment evaluation order
Previously, the right hand side was always evaluated before the
left hand side for constant assignments.  For the following:

```ruby
lhs::C = rhs
```

rhs was evaluated before lhs, which is inconsistant with attribute
assignment (lhs.m = rhs), and apparently also does not conform to
JIS 3017:2013 11.4.2.2.3.

Fix this by changing evaluation order.  Previously, the above
compiled to:

```
0000 putself                                                          (   1)[Li]
0001 opt_send_without_block                 <calldata!mid:rhs, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0003 dup
0004 putself
0005 opt_send_without_block                 <calldata!mid:lhs, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0007 setconstant                            :C
0009 leave
```

After this change:

```
0000 putself                                                          (   1)[Li]
0001 opt_send_without_block                 <calldata!mid:lhs, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0003 putself
0004 opt_send_without_block                 <calldata!mid:rhs, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0006 swap
0007 topn                                   1
0009 swap
0010 setconstant                            :C
0012 leave
```

Note that if expr is not a module/class, then a TypeError is not
raised until after the evaluation of rhs.  This is because that
error is raised by setconstant.  If we wanted to raise TypeError
before evaluation of rhs, we would have to add a VM instruction
for calling vm_check_if_namespace.

Changing assignment order for single assignments caused problems
in the multiple assignment code, revealing that the issue also
affected multiple assignment.  Fix the multiple assignment code
so left-to-right evaluation also works for constant assignments.

Do some refactoring of the multiple assignment code to reduce
duplication after adding support for constants. Rename struct
masgn_attrasgn to masgn_lhs_node, since it now handles both
constants and attributes. Add add_masgn_lhs_node static function
for adding data for lhs attribute and constant setting.

Fixes [Bug #15928]
2022-01-14 11:00:26 -08:00
Jean Boussier 8d05047d72 Add a Module#const_added callback
[Feature #17881]

Works similarly to `method_added` but for constants.

```ruby
Foo::BAR = 42 # call Foo.const_added(:FOO)
class Foo::Baz; end # call Foo.const_added(:Baz)
Foo.autoload(:Something, "path") # call Foo.const_added(:Something)
```
2022-01-14 11:30:07 +01:00
Vyacheslav Alexeev d0a0637948 [rubygems/rubygems] Use `Fiddle` in `bundle doctor` to check for dynamic library presence
https://github.com/rubygems/rubygems/commit/ecd495ce1b
2022-01-13 18:16:05 +09:00