87158 Commits

Author SHA1 Message Date
Peter Zhu
89bbb9a888 Fix call to each_location_ptr for ASAN 2024-08-30 10:45:25 -04:00
Peter Zhu
ca7b3d467d Combine gc_mark_locations and each_stack_location
Also renames the new function each_location_ptr to be consistent with
each_location.
2024-08-30 10:03:17 -04:00
Peter Zhu
e3f00df227 Drop support for Motorola 68000
The last Motorla 68000 architecture CPU was released 1994, so we can
probably drop support for it.
2024-08-30 10:03:17 -04:00
Matt Brictson
830ff66e2c [rubygems/rubygems] Emit progress to stderr when --parseable is passed to bundle outdated
Before, `bundle outdated --parseable` (or `--porcelain`) caused output
to be completely silenced during definition resolution, so nothing was
printed at all until the table of outdated gems was printed.

With this change, `--parseable`/`--porcelain` now prints progress to
stderr during resolution. E.g.:

```
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
```

This provides a better user experience, especially when
`outdated --parseable` takes several seconds or more.

The report of outdated gems is still printed to stdout, and the exit
status codes are unchanged, so the fundamental contract with other tools
consuming the `outdated --parseable` result should not be affected.

https://github.com/rubygems/rubygems/commit/7d4bb43570
2024-08-30 10:36:08 +00:00
David Rodríguez
08b92b67ff [rubygems/rubygems] Don't blow up when explicit version is removed from some git sources
`version` is actually an attribute of the dependency, not of the git
source. Sometimes it's passed to the git source to be able to fake a
gemspec in case there's no gemspec in the source, but it should not be
used for source comparison.

https://github.com/rubygems/rubygems/commit/d936fbd78e
2024-08-30 10:16:29 +00:00
David Rodríguez
63287fef9c [rubygems/rubygems] Fix grammar in one spec description
https://github.com/rubygems/rubygems/commit/a1046466c9
2024-08-30 10:16:28 +00:00
Kevin Newton
371432b2d7 [PRISM] Handle RubyVM.keep_script_lines 2024-08-29 20:27:01 -04:00
Alan Wu
554098303d [PRISM] For stdin scripts, use locale encoding
For example:

    $ echo 'p __ENCODING__' | LANG=C ruby
    #<Encoding:US-ASCII>

But, allow -K to override the source encoding.
Found by running spec/ruby/language/magic_comment_spec.rb with LANG=C.
2024-08-29 20:20:26 -04:00
Burdette Lamar
b1c569c193
[DOC] Related for Array#all? and Array#any? (#11495) 2024-08-29 16:31:26 -04:00
Koichi ITO
af65b41e07 [ruby/prism] Remove deprecated lib/prism/translation/parser/rubocop.rb file
Follow up https://github.com/ruby/prism/pull/2558.

This PR removes deprecated lib/prism/translation/parser/rubocop.rb file.

The file was a workaround to allow setting `TargetRubyVersion: 80_82_73_83_77.xx` until Prism (`Prism::Translation::Parser`) is integrated into RuboCop.
RuboCop already supports Prism (`Prism::Translation::Parser`) as of https://github.com/rubocop/rubocop/pull/12724.

It has been several months since the file was deprecated in ruby/prism#2558.
And, yesterday, Prism 1.0.0 was released, but perhaps the file should have been removed before then.

Although this might be seen as incompatible with semver 1.0.0, I think there is no longer a reason to keep the file.

https://github.com/ruby/prism/commit/646a10270e
2024-08-29 20:04:55 +00:00
Peter Zhu
22d9260f05 Remove unused ec argument in each_stack_location 2024-08-29 16:03:48 -04:00
Kevin Newton
9f4954559b [PRISM] Handle nth reference ERANGE with warning 2024-08-29 15:24:55 -04:00
Peter Zhu
1f114464fc Change each_stack_location to accept data instead of objspace
The callers were abusing each_stack_location and passing data into the objspace
argument.
2024-08-29 14:37:01 -04:00
Peter Zhu
c162da69e7 Change each_location to accept data instead of objspace
The callers were abusing each_location and passing data into the objspace
argument.
2024-08-29 14:37:01 -04:00
Yuta Saito
591a157b0f prism_compile.c: Fix read_entire_file() for platforms without file mmap
Apply similar fix to https://github.com/ruby/prism/pull/2944
2024-08-29 14:09:35 -04:00
Alan Wu
e07f794967 Stop using the "undef" keyword to remove a constant
The keyword tries to remove a method of the same name which is unlikely
to be the intention of this test:

    $ ruby -e 'undef Object'
    -e:1:in '<main>': undefined method 'Object' for class 'Object' (NameError)

Found looking at GH-11497. The NameError triggers error_highlight, which
loads a bunch of file under GC.stress set by this test when using Prism.
That takes a long time, causing a timeout.
2024-08-29 13:54:55 -04:00
tomoya ishida
b74e0c5f6b [ruby/reline] Calculate mbchar width with bsearch
(https://github.com/ruby/reline/pull/632)

https://github.com/ruby/reline/commit/0851e93640
2024-08-29 17:34:31 +00:00
BurdetteLamar
a04dd0bf5e [DOC] Related for Array#[]= 2024-08-29 10:44:29 -04:00
Burdette Lamar
74888846e5
[DOC] Relateds for combo methods (#11483) 2024-08-29 10:43:54 -04:00
Kevin Newton
079161e1ba [PRISM] Respect PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING flag 2024-08-29 10:31:02 -04:00
Kevin Newton
14bb376b79 [PRISM] Copy the rest of the setup_args_dup_rest_p function 2024-08-29 10:29:34 -04:00
Peter Zhu
6b08a50a62 Move checks for special const for marking
This commit moves checks to RB_SPECIAL_CONST_P out of the GC implmentation
and into gc.c.
2024-08-29 09:11:40 -04:00
Peter Zhu
ddd2b17845 Move marking code together in gc.c 2024-08-29 09:11:40 -04:00
Nobuyoshi Nakada
d33e3d47b8
[Bug #20704] Win32: Fix chdir to non-ASCII path
On Windows, `chdir` in compilers' runtime libraries uses the active
code page, but command line arguments in ruby are always UTF-8, since
commit:33ea2646b98adb49ae2e1781753bf22d33729ac0.
2024-08-29 19:41:53 +09:00
David Rodríguez
871ba3e9e3 [rubygems/rubygems] Add a note about "platforms" in Gemfile vs "platforms" in Gemfile.lock
https://github.com/rubygems/rubygems/commit/0dd4bd59b4
2024-08-29 09:59:26 +00:00
David Rodríguez
6dee0d3fb0 [rubygems/rubygems] Reject unknown platforms when running bundle lock --add-platform
https://github.com/rubygems/rubygems/commit/1f93a2bdc5
2024-08-29 09:59:26 +00:00
Hiroshi SHIBATA
1515353353 Make optional benchmark test in OpenSSL::OSSL#test_memcmp_timing 2024-08-29 17:37:44 +09:00
Hiroshi SHIBATA
4e5b3e58e2 Make optional benchmark test in test_find_in_unresolved_tree_is_not_exponentiental 2024-08-29 17:37:44 +09:00
Hiroshi SHIBATA
a780633d2a Don't use benchmark for test_activate_via_require_respects_loaded_files
benchmark.rb may extract as bundled gems in the future release
2024-08-29 17:37:44 +09:00
Hiroshi SHIBATA
a68208235e Removed redundant require for TestGemRequire 2024-08-29 17:37:44 +09:00
Hiroshi SHIBATA
7cc6f70aa2
Surpressing 'unknown command: “Switch to inspect mode.”' message 2024-08-29 11:11:35 +09:00
Alan Wu
fe440c5967 [PRISM] Use node flags for dup_rest detection instead of looping 2024-08-28 19:27:15 -04:00
Alan Wu
3fa5b4be19 [DOC] Mention rb_io_fdopen() takes ownership of the FD 2024-08-28 17:27:57 -04:00
Alan Wu
c3ffa7106b [PRISM] Set use_block parameter flag for forwardable methods
Match logic in compile.c:2133. Without this, the unused block warning
code allocates an array, causing TestAllocation to fail.
2024-08-28 17:17:33 -04:00
Burdette Lamar
dba9601e0f
[DOC] Array comparing doc (#11486) 2024-08-28 17:17:21 -04:00
Kevin Newton
d25833b81a [ruby/prism] Multi-splat flag for arguments
https://github.com/ruby/prism/commit/21cb9b78ae
2024-08-28 21:10:39 +00:00
BurdetteLamar
ec88979a06 Related for Array#<< 2024-08-28 16:51:33 -04:00
git
570a95805a Update default gems list at ad737a8d0f5929dd8e2cdd1ab8f75a [ci skip] 2024-08-28 19:45:20 +00:00
Kevin Newton
ad737a8d0f
[PRISM] Sync version update 2024-08-28 15:43:32 -04:00
Kevin Newton
45f32e3a50 [ruby/prism] Reverse-sync ruby/ruby and deprecate old fields
https://github.com/ruby/prism/commit/bc21c9f3ee
2024-08-28 19:07:16 +00:00
Kevin Newton
417bb8d4fd [PRISM] Field renaming
Rename some fields that do not quite make sense.

* CaseMatchNode#consequent -> CaseMatchNode#else_clause
* CaseNode#consequent -> CaseNode#else_clause
* IfNode#consequent -> IfNode#subsequent
* RescueNode#consequent -> RescueNode#subsequent
* UnlessNode#consequent -> UnlessNode#else_clause
2024-08-28 15:06:53 -04:00
BurdetteLamar
acafb92464 [DOC] Remove Array#abbrev 2024-08-28 15:05:52 -04:00
BurdetteLamar
a7cec438a1 [DOC] More xrefs for array creation 2024-08-28 15:05:04 -04:00
tomoya ishida
8f95e2abfe [ruby/irb] Make colorize test pass with NO_COLOR env set
(https://github.com/ruby/irb/pull/994)

https://github.com/ruby/irb/commit/985ac509c1
2024-08-28 18:07:40 +00:00
Benoit Daloze
d6764076a1 [ruby/prism] Review config.yml: documentation, types and field names
https://github.com/ruby/prism/commit/d43333539e
2024-08-28 17:42:56 +00:00
Alan Wu
7c9bcdf397 [PRISM] Improve dup_rest optimization targeting
Part of implementing 3de20efc308cccc38bf9dacfffca6c626d039a06 in
prism_compile.c. Down to 2 failures from 30 failures in
test/ruby/test_allocation.rb.
2024-08-28 13:34:37 -04:00
tomoya ishida
ce6b0c4425 [ruby/irb] Colorize command input
(https://github.com/ruby/irb/pull/983)

https://github.com/ruby/irb/commit/0e64136e76
2024-08-28 16:16:31 +00:00
Kevin Newton
ccef391140 [ruby/prism] Swap around order of predicates for assoc static literal
https://github.com/ruby/prism/commit/ec181a3b68
2024-08-28 15:35:23 +00:00
Kevin Newton
4c5a1dad0a [PRISM] Check length of line for shebang 2024-08-28 10:50:46 -04:00
BurdetteLamar
91c6c2bdb5 Related methods for Array#delete 2024-08-28 10:43:37 -04:00