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

3502 Коммитов

Автор SHA1 Сообщение Дата
Peter Zhu 2e6ddd968d Don't enable GC.auto_compact in EnvUtil.under_gc_compact_stress when not supported 2024-10-11 17:00:30 -04:00
Samuel Giddins a392ee1437
Update vendored net-http
Signed-off-by: Samuel Giddins <segiddins@segiddins.me>
2024-10-10 10:03:34 +09:00
Nobuyoshi Nakada 5eee269866
Make mkconfig.rb string literals frozen 2024-10-09 17:55:49 +09:00
Hiroshi SHIBATA fc2efc2bdb Added win32-registry 2024-10-09 13:55:45 +09:00
Kazuhiro NISHIYAMA bd85e88d31
Support `The following bundled gems are added.` 2024-10-09 12:55:28 +09:00
Nobuyoshi Nakada 5840b4363f
[DOC] Use the recent RDoc always to generate the doc of ruby itself 2024-10-09 10:05:19 +09:00
Nobuyoshi Nakada 02101f473b
rdoc-srcdir: Adjust the version number in the title in .rdoc_options
Other command line options are no longer needed usually.
2024-10-08 23:43:02 +09:00
Hiroshi SHIBATA ec526c61c9
json upstream is ruby/json now 2024-10-07 10:04:42 +09:00
Hiroshi SHIBATA c5b1df7524 Skip related tests in PathnameInstanceTest 2024-10-04 12:21:27 +09:00
Soutaro Matsumoto e5c26b0f32 Stop skipping broken tests 2024-10-03 09:40:57 +09:00
Hiroshi SHIBATA bb97061f65 SKip failing tests that are caused by unknown IOError 2024-10-02 18:03:18 +09:00
Luke Gruber d592ddd5e6 Fix compile issue with a short-circuited if/unless condition and `defined?`
This caused an issue when `defined?` was in the `if` condition. Its
instructions weren't appended to the instruction sequence even though it was compiled
if a compile-time known logical short-circuit happened before the `defined?`. The catch table
entry (`defined?` compilation produces a catch table entry) was still on the iseq even though the
instructions weren't there. This caused faulty exception handling in the method.
The solution is to no add the catch table entry for `defined?` after a compile-time known logical
short circuit.

This shouldn't touch much code, it's only for cases like the following,
which can occur during debugging:

    if false && defined?(Some::CONSTANT)
    "more code..."
    end

Fixes [Bug #20501]
2024-10-01 02:12:56 +09:00
Hiroshi SHIBATA 3fe59b04d6
-l option of 7z is unknown switch with the `ubuntu-latest`.
https://github.com/ruby/actions/actions/runs/11095032727/job/30823174026#step:3:349
2024-09-30 12:03:02 +09:00
Hiroshi SHIBATA c1ee5ea28f
Avoid to unintentional Bundler definition by Bundler::Definition.no_lock 2024-09-27 18:39:05 +09:00
David Rodríguez b2ee760f30
Update test dependencies 2024-09-26 17:07:20 +09:00
Nobuyoshi Nakada 0283b5ddb4 Check syntax warnings in built-in scripts 2024-09-25 11:18:41 +09:00
Hiroshi SHIBATA d9f6e326ad
Don't update lockfile with bundler/inline 2024-09-19 18:06:28 +09:00
David Rodríguez 7d80c139f7
Unlock parallel_tests 2024-09-17 14:41:19 +09:00
Kevin Newton d57bc870ac [PRISM] Remove snapshot testing from Prism sync 2024-09-16 08:44:19 -04:00
Yusuke Endoh f090d1fa59 Try to find bundled gem version from lib/*/version.rb 2024-09-13 15:49:28 +09:00
Hiroshi SHIBATA 3146cbbbc4
Dont't warn reline called from irb, reline is already declared at irb gemspec 2024-09-13 13:19:31 +09:00
Kevin Newton ea2af5782d Switch the default parser from parse.y to Prism
This commit switches the default parser to Prism. There are a
couple of additional changes related to this that are a part of
this as well to make this happen.

* Switch the default parser in parse.h
* Remove the Prism-specific workflow and add a parse.y-specific
  workflow to CI so that it continues to be tested
* Update a few test exclusions since Prism has the correct
  behavior but parse.y doesn't per
  https://bugs.ruby-lang.org/issues/20504.
* Skips a couple of tests on RBS which are failing because they
  are using RubyVM::AbstractSyntaxTree.of.

Fixes [Feature #20564]
2024-09-12 13:43:04 -04:00
Nobuyoshi Nakada fcb058309b Accept version range
Single `Integer` argument means an exact match to the major version.
2024-09-12 23:47:34 +09:00
ydah f47c057c32 Remove unnecessary file 2024-09-12 21:06:16 +09:00
ydah 885cf350de Lrama v0.6.10 2024-09-12 21:06:16 +09:00
Nobuyoshi Nakada 14c72e96ae
Remove an unnecessary blank line added by mistake [ci skip] 2024-09-10 17:19:02 +09:00
Nobuyoshi Nakada 2d12fbc4db Add predicates for platforms 2024-09-10 16:50:21 +09:00
Nobuyoshi Nakada ecb58a8d08
Fix prelude to use IBF
Since universal-parser and prism support, prelude code used functions
inaccessible from outside libruby shared library.

```
linking goruby
/usr/bin/ld: goruby.o: in function `prelude_eval':
/home/runner/work/ruby/ruby/build/golf_prelude.c:221: undefined reference to `rb_ruby_prism_ptr'
/usr/bin/ld: goruby.o: in function `pm_prelude_load':
/home/runner/work/ruby/ruby/build/golf_prelude.c:192: undefined reference to `pm_options_line_set'
/usr/bin/ld: /home/runner/work/ruby/ruby/build/golf_prelude.c:193: undefined reference to `pm_parse_string'
/usr/bin/ld: goruby.o: in function `prelude_eval':
/home/runner/work/ruby/ruby/build/golf_prelude.c:224: undefined reference to `pm_iseq_new_with_opt'
/usr/bin/ld: /home/runner/work/ruby/ruby/build/golf_prelude.c:226: undefined reference to `pm_parse_result_free'
/usr/bin/ld: goruby.o: in function `prelude_ast_value':
/home/runner/work/ruby/ruby/build/golf_prelude.c:181: undefined reference to `rb_ruby_ast_data_get'
/usr/bin/ld: goruby.o: in function `prelude_eval':
/home/runner/work/ruby/ruby/build/golf_prelude.c:231: undefined reference to `rb_ruby_ast_data_get'
/usr/bin/ld: goruby.o: in function `pm_prelude_load':
/home/runner/work/ruby/ruby/build/golf_prelude.c:196: undefined reference to `pm_parse_result_free'
collect2: error: ld returned 1 exit status
```
2024-09-08 23:40:17 +09:00
Peter Zhu cf3b62b545 Fix check_tempfile_leak in leakchecker.rb
The instance variable @tmpfile was removed in ddcfc9f so check_tempfile_leak
did not work.
2024-09-05 14:03:39 -04:00
Nobuyoshi Nakada e884d65094
Ignore blocks to `Test::Unit::Assertions#pend` silently
Although `pend` in test-unit gem expects the block does not pass if it
is given, our `pend` should ignore the block silently as same as it
just skips the test with no message by default.  Add an unused
parameter, to suppress the warning for the block to be ignored.
2024-09-04 14:49:25 +09:00
Hiroshi SHIBATA a3e08718b4
Use bundler/inline to download diffy gem 2024-09-04 14:44:34 +09:00
Takashi Kokubun 1b8fb4860b Revert "Experiment with removing --profile ruby for now"
This reverts commit 6986536488.

We were just missing the secrets.
2024-09-02 23:37:15 -07:00
Takashi Kokubun 6986536488 Experiment with removing --profile ruby for now 2024-09-02 23:31:58 -07:00
Takashi Kokubun ad613d0884 Try to fix AWS_CLI_OPTS with AWS_ACCESS_KEY_ID 2024-09-02 23:29:43 -07:00
Takashi Kokubun 20c3401543 Drop `--profile ruby` on the release workflow 2024-09-02 23:25:20 -07:00
David Rodríguez 053caa313b
Fix `gem exec rails new foo` failing on Ruby 3.2
The default version of securerandom (0.2.2) gets activated by RubyGems,
but does not match Rails requirements (>= 0.3), leading to an error like
this:

```
$ gem exec rails new repro
/Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:2246:in `raise_if_conflicts': Unable to activate activesupport-7.2.1, because securerandom-0.2.2 conflicts with securerandom (>= 0.3) (Gem::ConflictError)
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:1383:in `activate'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:1421:in `block in activate_dependencies'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:1403:in `each'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:1403:in `activate_dependencies'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:1385:in `activate'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/core_ext/kernel_gem.rb:62:in `block in gem'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/core_ext/kernel_gem.rb:62:in `synchronize'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/core_ext/kernel_gem.rb:62:in `gem'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/exec_command.rb:193:in `activate!'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/exec_command.rb:73:in `execute'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command.rb:326:in `invoke_with_build_args'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command_manager.rb:255:in `invoke_command'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command_manager.rb:194:in `process_args'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command_manager.rb:152:in `run'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/gem_runner.rb:56:in `run'
	from /Users/deivid/code/rubygems/rubygems/exe/gem:12:in `<main>'
```

Vendoring our own securerandom fixes the issue since that way we avoid
activating the gem internally.
2024-09-03 10:49:13 +09:00
Nobuyoshi Nakada a33416a333
Fix runnable symlinks
Fix symlinks to executable as relative paths from `bin` directory.
2024-09-03 09:59:28 +09:00
Takashi Kokubun b6e7e903a0 redmine-backporter: Support matching multiple revs
with `done` command
2024-09-02 02:25:29 -07:00
Takashi Kokubun 7d47f3c94f redmine-backporter: Clarify the actual control flow
The `rev && has_commit(rev, "ruby_#{TARGET_VERSION.tr('.','_')}")`
case seems to be used if and only if it's manually specified in the
argument to the done command. It was hard to notice it with the previous
code.
2024-09-02 02:22:45 -07:00
git 2afde63eef * remove trailing spaces. [ci skip] 2024-08-31 05:22:36 +00:00
Hiroshi SHIBATA f304afd26d
Added check method with released version of rubygems.org 2024-08-31 14:22:17 +09:00
David Rodríguez 52082d19e0 `load_relative` is always falsy here 2024-08-23 12:17:07 +09:00
David Rodríguez fbadcd277f Reuse `load_relative` local 2024-08-23 12:17:07 +09:00
Hiroshi SHIBATA 64a005df3b `make test-tool` with Windows is broken. We should use :KILL with that platform.
```
[ 14/191] TestParallel::TestParallel#test_hungup = 11.02 s
  1) Failure:
TestParallel::TestParallel#test_hungup [C:/Users/hsbt/DevDrive/github.com/ruby/ruby/tool/test/testunit/test_parallel.rb:211]:
Expected /^Retrying hung up testcases\.+$/ to match "Run options: \n" +
"  --seed=35582\n" +
"  --ruby\n" +
"  \".\\\\ruby.exe -I../../ruby/lib -I.ext/x64-mswin64_140 -I. ../../ruby/tool/runruby.rb --extout=.ext -- --disable-gems\"\n" +
"  -j\n" +
"  t1\n" +
"  --worker-timeout=1\n" +
"\n" +
"# Running tests:\n" +
"\n" +
"[1/1] 50340=test4test_hungup.\n" +
"C:/Users/hsbt/DevDrive/github.com/ruby/ruby/tool/lib/test/unit.rb:418:in 'Process.kill': Invalid argument (Errno::EINVAL)\n" +
```
2024-08-22 11:29:48 +09:00
Nobuyoshi Nakada 6ab591f80a
[Bug #20687] Check if base ruby provides necessary libraries 2024-08-21 16:56:44 +09:00
Soutaro Matsumoto ea828c0bf0 Skip failing tempfile library tests 2024-08-21 13:55:09 +09:00
Peter Zhu 2f67610f6b Remove dependency on Tempfile::Remover in leakchecker.rb 2024-08-20 14:29:40 -04:00
Nobuyoshi Nakada d6f18b226e
Remove extraneous lock files
See https://github.com/rubygems/rubygems/pull/7939
2024-08-20 20:16:45 +09:00
Victor Shepelev d450f9d6a2
Make Range#step to consistently use + for iteration (#7444)
Make Range#step to consistently use + for iteration [Feature #18368]

Previously, non-numerics expected step to be integer,
and iterated with begin#succ, skipping over step value
steps. Since this commit, numeric and non-numeric iteration
behaves the same way, by using + operator.
2024-08-18 13:15:18 +03:00
tomoya ishida 8a7e6f6852
Improve base time of assert_linear_performance (#11369)
Remove `.ceil` from base time calculation that makes 10x gap.
This will make the assertion more strict and also less flaky.
2024-08-15 06:55:57 +00:00