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

88535 Коммитов

Автор SHA1 Сообщение Дата
git 201e1c6c2e Update default gems list at 7d9e9eabe7 [ci skip] 2024-11-06 08:06:05 +00:00
Hiroshi SHIBATA 7d9e9eabe7 [ruby/tmpdir] Bump up v0.3.0
https://github.com/ruby/tmpdir/commit/ef9ca591cf
2024-11-06 08:05:01 +00:00
git 348e925689 Update default gems list at 7e167b3225 [ci skip] 2024-11-06 07:48:42 +00:00
Hiroshi SHIBATA 7e167b3225 [ruby/tempfile] Bump up v0.3.0
https://github.com/ruby/tempfile/commit/2ff9b3ccef
2024-11-06 07:47:49 +00:00
git 9b287d3b3b Update default gems list at a3a0c675c1 [ci skip] 2024-11-06 07:33:37 +00:00
Hiroshi SHIBATA a3a0c675c1 [ruby/yaml] Bump up v0.4.0
https://github.com/ruby/yaml/commit/5e9bfff132
2024-11-06 07:32:52 +00:00
git 6e4fcddc7f Update default gems list at 0949c586c0 [ci skip] 2024-11-06 07:10:05 +00:00
Hiroshi SHIBATA 0949c586c0 [ruby/pathname] Bump up v0.4.0
https://github.com/ruby/pathname/commit/b020cbde46
2024-11-06 07:09:08 +00:00
Hiroshi SHIBATA a2dd471d9e
macOS 15 is the stable version today 2024-11-06 15:45:32 +09:00
Nobuyoshi Nakada d71be7274b
[Bug #20873] Consider `-FIXNUM_MIN` overflow
`-FIXNUM_MIN` is usually greater than `FIXNUM_MAX` on platforms using
two's complement representation.
2024-11-06 13:31:38 +09:00
Nobuyoshi Nakada 18c3e2d9f1
Assert newly added warning in `JSON.load` 2024-11-06 12:58:21 +09:00
Nobuyoshi Nakada c690ca03f3 Ignore return value of `into_raw_fd`
Fix as the compiler orders:
```
warning: unused return value of `into_raw_fd` that must be used
   --> ../src/yjit/src/disasm.rs:123:21
    |
123 |                     file.into_raw_fd(); // keep the fd open
    |                     ^^^^^^^^^^^^^^^^^^
    |
    = note: losing the raw file descriptor may leak resources
    = note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
    |
123 |                     let _ = file.into_raw_fd(); // keep the fd open
    |                     +++++++

warning: unused return value of `into_raw_fd` that must be used
  --> ../src/yjit/src/log.rs:84:21
   |
84 |                     file.into_raw_fd(); // keep the fd open
   |                     ^^^^^^^^^^^^^^^^^^
   |
   = note: losing the raw file descriptor may leak resources
help: use `let _ = ...` to ignore the resulting value
   |
84 |                     let _ = file.into_raw_fd(); // keep the fd open
   |                     +++++++
```
2024-11-06 12:37:13 +09:00
Koichi Sasada ab7ab9e450 `Warning[:strict_unused_block]`
to show unused block warning strictly.

```ruby
class C
  def f = nil
end

class D
  def f = yield
end

[C.new, D.new].each{|obj| obj.f{}}
```

In this case, `D#f` accepts a block. However `C#f` doesn't
accept a block. There are some cases passing a block with
`obj.f{}` where `obj` is `C` or `D`. To avoid warnings on
such cases, "unused block warning" will be warned only if
there is not same name which accepts a block.
On the above example, `C.new.f{}` doesn't show any warnings
because there is a same name `D#f` which accepts a block.

We call this default behavior as "relax mode".

`strict_unused_block` new warning category changes from
"relax mode" to "strict mode", we don't check same name
methods and `C.new.f{}` will be warned.

[Feature #15554]
2024-11-06 11:06:18 +09:00
Kevin Newton 4203c70dfa Allow eval to see top scope
Fixes [Bug #20856]

Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
2024-11-05 17:08:35 -05:00
Jean Boussier 4120f2babd [ruby/json] Appease ruby/ruby CI
https://github.com/ruby/json/commit/bc2c970ce4
2024-11-05 18:00:36 +01:00
Jean Boussier 633f65e471 [ruby/json] Strip whitespaces
https://github.com/ruby/json/commit/e85107197b
2024-11-05 18:00:36 +01:00
Jean Boussier 9987298654 Update depend files 2024-11-05 18:00:36 +01:00
Jean Boussier ca8f21ace8 [ruby/json] Resync 2024-11-05 18:00:36 +01:00
Benoit Daloze e8522f06b5 [ruby/json] Re-enable passing test
https://github.com/ruby/json/commit/82d21f01c5
2024-11-05 18:00:36 +01:00
Jean Boussier f664e7eaab [ruby/json] Add tests for the behavior of JSON.generate with base types subclasses
Ref: https://github.com/ruby/json/pull/674
Ref: https://github.com/ruby/json/pull/668

The behavior on such case it quite unclear, the goal here is to
figure out whatever was the behavior on Cext version of `json 2.7.0`
and get all implementations to converge.

We can then decide to make them all behave differently if we so wish.

https://github.com/ruby/json/commit/614921dcef
2024-11-05 18:00:36 +01:00
Jean Boussier 2f84a02ad5 [ruby/json] Use rb_str_new_frozen
https://github.com/ruby/json/commit/90c8aaaa6a
2024-11-05 18:00:36 +01:00
Jean Boussier ed22e68379 [ruby/json] JSON::Ext::Parser mark the name cache entries when not on the heap
This is somewhat dead code as unless you are using `JSON::Parser.new`
direcltly we never allocate `JSON::Ext::Parser` anymore.

But still, we should mark all its reference in case some code out there
uses that.

Followup: #675

https://github.com/ruby/json/commit/8bf74a977b
2024-11-05 18:00:36 +01:00
Jean Boussier 241a03483c Update json gem syncing logic 2024-11-05 18:00:36 +01:00
David Rodríguez 7fe775698b [rubygems/rubygems] Test with JRuby 9.4.9.0
https://github.com/rubygems/rubygems/commit/b282668d9d
2024-11-05 16:07:25 +00:00
Matt Valentine-House 01e509c45b Remove RGENGC_FORCE_MAJOR_GC flag
[Bug #20762]
2024-11-05 15:36:34 +00:00
Nobuyoshi Nakada 74fcf43767
Use wide character startup
Mingw crt-git 12.0.0.r369.g0d4221712-1 now prohibits "command line
contains characters that are not supported in the active code page".
0d42217123/

Already Ruby builds `argv` in `rb_w32_sysinit`, instead of mswin- or
mingw-made `argv`.  Just bypass the conversion in mingw crt.
2024-11-05 23:04:49 +09:00
YO4 ed06f018bd [ruby/irb] windows does not support Process.kill("TERM", pid)
(https://github.com/ruby/irb/pull/1026)

https://github.com/ruby/irb/commit/7bbb885163
2024-11-05 13:53:41 +00:00
Jean Boussier e440268d51 Get rid of JSON benchmarks 2024-11-05 12:19:55 +01:00
Jean Boussier 1cb9f9af23 tool/sync_default_gems.rb: update json rules
`lib/json/ext/generator/state.rb` should actually be
`ext/json/lib/json/ext/generator/state.rb`
2024-11-05 12:19:55 +01:00
Yusuke Endoh 6c5a808b86 Use rb_fiber_scheduler_get() instead of rb_fiber_scheduler_current()
rb_fiber_scheduler_current() may return nil depending on whether the
scheduler is being prevented for some reason, e.g., Fiber.blocking{}.

Co-Authored-By: Samuel Williams <samuel.williams@oriontransfer.co.nz>
2024-11-05 19:48:00 +09:00
Nobuyoshi Nakada cb1c79e87b
Name dependency checks job
And run on the latest ubuntu.
2024-11-05 18:04:19 +09:00
Yusuke Endoh 7e9c5903a8 Update dependency 2024-11-05 17:55:59 +09:00
Yusuke Endoh 2d2d363012 Let vm_dump show whether the fiber scheduler is enabled or not
... just for the case.
2024-11-05 17:48:01 +09:00
Nobuyoshi Nakada 348a534153 [ruby/stringio] Copy from the relocated string
When ungetting the string same as the same buffer string, extending
the buffer can move the pointer in the argument.  Reported by manun
Manu (manun) at https://hackerone.com/reports/2805165.

https://github.com/ruby/stringio/commit/95c1194832
2024-11-05 05:01:03 +00:00
Nobuyoshi Nakada 511954dd5c [ruby/date] Extract Julian calendar epoch literals
https://github.com/ruby/date/commit/e677e99a86
2024-11-05 04:19:40 +00:00
Nobuyoshi Nakada c51feedbfd [ruby/date] Update `argc` by `rb_scan_args` not to contain keywords
https://github.com/ruby/date/commit/f277463439
2024-11-05 04:19:39 +00:00
Nobuyoshi Nakada e4f5fd8e5f [ruby/date] Refine assertions
https://github.com/ruby/date/commit/1970b740d0
2024-11-05 04:19:39 +00:00
Dmitrii Zudin ee4599dbe7 [ruby/date] Fix incorrect argc2 decrement in datetime_s_iso8601 function
Replace the decrement (argc2--) with an increment (argc2++) for
the correct number of arguments when opt is provided.

https://github.com/ruby/date/commit/b6974b00d8
2024-11-05 03:38:13 +00:00
Hiroshi SHIBATA e0611ebd9a Try macos-15 build
https://github.com/actions/runner-images/issues/10686
2024-11-05 12:15:13 +09:00
Hiroshi SHIBATA ff56064469
Fixup b1fc1af444. Removed benchmark files from ruby/json 2024-11-05 11:02:13 +09:00
nagachika b1fc1af444 Stop syncing json benchmarks. 2024-11-05 08:58:53 +09:00
Takashi Kokubun d6d2c24715 macos-12 is deprecated and fails on Mondays
https://github.com/actions/runner-images/issues/10721
2024-11-04 14:51:56 -08:00
Alexis Bernard 7ae4b858b3 [ruby/rdoc] Display class ancestors in the sidebar #1183
https://github.com/ruby/rdoc/commit/50dda13426
2024-11-04 17:34:27 +00:00
Takashi Kokubun 478e0fc710
YJIT: Replace Array#each only when YJIT is enabled (#11955)
* YJIT: Replace Array#each only when YJIT is enabled

* Add comments about BUILTIN_ATTR_C_TRACE

* Make Ruby Array#each available with --yjit as well

* Fix all paths that expect a C location

* Use method_basic_definition_p to detect patches

* Copy a comment about C_TRACE flag to compilers

* Rephrase a comment about add_yjit_hook

* Give METHOD_ENTRY_BASIC flag to Array#each

* Add --yjit-c-builtin option

* Allow inconsistent source_location in test-spec

* Refactor a check of BUILTIN_ATTR_C_TRACE

* Set METHOD_ENTRY_BASIC without touching vm->running
2024-11-04 11:14:28 -05:00
Nobuyoshi Nakada 51ac93011a
Fix a typo in a local variable name 2024-11-04 23:32:25 +09:00
Nobuyoshi Nakada 4dc120cb7f
Fix Dir.mktmpdir argument
The temporary directory is the second argument.
2024-11-04 23:32:25 +09:00
Étienne Barrié 1e037108a1 Precompute hash only once when interning string literals
When a fake string is interned, use the capa field to store the string
hash. This lets us compute it once for hash lookup and embedding the
hash in the interned string.

Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
2024-11-04 14:37:14 +01:00
Nobuyoshi Nakada 09874e90bf
Mingw: Exclude failing tests due to the crt change
Mingw crt-git 12.0.0.r369.g0d4221712-1 now prohibits "command line
contains characters that are not supported in the active code page".
0d42217123/

Provisionally exclude tests that fail by passing such characters.
2024-11-04 21:12:49 +09:00
David Rodríguez e7518a7859 Validate user input encoding
If the user has the encoding of her system messed up, she may end up
sending us incorrectly encoding input, causing "invalid byte sequence in
UTF-8" errors at random places.

These errors can be forced on a system without encoding issues with
something like:

```
$ gem install$(echo -e "\xFF") foo
/Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/config_file.rb:534:in `block in set_config_file_name': invalid byte sequence in UTF-8 (ArgumentError)
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/config_file.rb:530:in `each'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/config_file.rb:530:in `set_config_file_name'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/config_file.rb:177:in `initialize'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/gem_runner.rb:71:in `new'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/gem_runner.rb:71:in `do_configuration'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/gem_runner.rb:33:in `run'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/bin/gem:10:in `<main>'
```

This commit makes RubyGems print a better error in this case:

```
$ ruby -Ilib bin/gem install$(echo -e "\xFF") foo
/Users/deivid/Code/rubygems/rubygems/lib/rubygems/gem_runner.rb:75:in `validate_encoding': invalid argument: 'install�' has invalid encoding (Gem::OptionParser::InvalidArgument)
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/gem_runner.rb:31:in `run'
	from bin/gem:10:in `<main>'
```
2024-11-04 10:18:55 +00:00
David Rodríguez 9ce1b5e11f [rubygems/rubygems] Fix commands with 2 MFA requests when webauthn is enabled
If a command requires two MFA authenticated requests, and webauthn is
enabled, then first one will succeed but the second one will fail
because it tries to reuse the OTP code from the first request and that
does not work.

This happens when you have not yet logged in to rubygems.org, or when
you have an API key with invalid scopes for the current operation. In
that case, we need:

* An API request to get a token or change scopes for the one that you
  have.
* Another API request to perform the actual operation.

Instead of trying to reuse the token, make sure it's cleared so we are
asked to authenticate again. We only do this when webauthn is enabled
because reusing TOPT tokens otherwise is allowed and I don't want to
break that.

https://github.com/rubygems/rubygems/commit/669e343935
2024-11-04 10:04:58 +00:00