summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-13[DOC] Add the link to [Feature #18809]Nobuyoshi Nakada
2022-08-13Add a NEWS entry about Integer#ceildiv [ci skip]Kouhei Yanagita
Notes: Merged: https://github.com/ruby/ruby/pull/6237
2022-08-13* 2022-08-13 [ci skip]git
2022-08-13[ruby/rdoc] [DOC] Enhances text about escapes ↵Burdette Lamar
(https://github.com/ruby/rdoc/pull/917) https://github.com/ruby/rdoc/commit/c40bac829c
2022-08-12Adjust columns in gems/bundled_gems [ci skip]Nobuyoshi Nakada
2022-08-12Preserve each column positions in gems/bundled_gemsNobuyoshi Nakada
2022-08-12Bundle unreleased debugNobuyoshi Nakada
2022-08-12Introduce with_warn_vsprintf macroS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/6225
2022-08-12Short-circuit `Process._fork`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6139
2022-08-12[Bug #18962] Do not read again once reached EOFNobuyoshi Nakada
`Ripper::Lexer#parse` re-parses the source code with syntax errors when `raise_errors: false`. Co-Authored-By: tompng <tomoyapenguin@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/6233
2022-08-12Improve performance of Integer#ceildivKouhei Yanagita
This patch is suggested by nobu. Benchmark result: ``` require 'benchmark' n = 10 ** 7 Benchmark.bm do |x| x.report("Fixnum/Fixnum") { a, b = 5, 2; n.times { a.ceildiv(b) } } x.report("Bignum/Bignum") { a, b = 10**100, 10**99 - 1; n.times { a.ceildiv(b) } } x.report("Bignum/Fixnum") { a, b = 10**100, 3; n.times { a.ceildiv(b) } } end ``` Original: ``` user system total real Fixnum/Fixnum 3.340009 0.043029 3.383038 ( 3.384022) Bignum/Bignum 8.229500 0.118543 8.348043 ( 8.349574) Bignum/Fixnum 8.328971 0.097842 8.426813 ( 8.426952) ``` Improved: ``` user system total real Fixnum/Fixnum 0.699140 0.000961 0.700101 ( 0.700199) Bignum/Bignum 5.076165 0.083160 5.159325 ( 5.159360) Bignum/Fixnum 5.548684 0.115372 5.664056 ( 5.666735) ``` Notes: Merged: https://github.com/ruby/ruby/pull/5965
2022-08-12Remove Numeric#ceildivKouhei Yanagita
Notes: Merged: https://github.com/ruby/ruby/pull/5965
2022-08-12Add Numeric#ceildiv and Integer#ceildivKouhei Yanagita
Notes: Merged: https://github.com/ruby/ruby/pull/5965
2022-08-12Stop defining `RUBY_ABI_VERSION` if released versionsNobuyoshi Nakada
As commented in include/ruby/internal/abi.h, since teeny versions of Ruby should guarantee ABI compatibility, `RUBY_ABI_VERSION` has no role in released versions of Ruby. Notes: Merged: https://github.com/ruby/ruby/pull/6231
2022-08-12Add missing `rb_enc_iscntrl`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6235
2022-08-12[DOC] Use `true`/`false` for `@retval`s which are `bool`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6235
2022-08-12No bundled gems to be installed from gem nowNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6234
2022-08-12All extensions in bundled gems are built by build-ext nowNobuyoshi Nakada
`RbInstall::GemInstaller#build_extensions` has nothing to do. Notes: Merged: https://github.com/ruby/ruby/pull/6234
2022-08-12[ruby/error_highlight] Add a note about the current limitation of ↵Yusuke Endoh
ErrorHighlight.spot https://github.com/ruby/error_highlight/commit/489ce80a62
2022-08-12[ruby/rdoc] Mods to section Text Markup (https://github.com/ruby/rdoc/pull/916)Burdette Lamar
https://github.com/ruby/rdoc/commit/5506d4d67e
2022-08-12[ruby/rdoc] Improvements to Text Markup examples ↵Burdette Lamar
(https://github.com/ruby/rdoc/pull/915) https://github.com/ruby/rdoc/commit/d00ddfe57c
2022-08-12* 2022-08-12 [ci skip]git
2022-08-11Fix inspect for unicode codepoint 0x85Jeremy Evans
This is an inelegant hack, by manually checking for this specific code point in rb_str_inspect. Some testing indicates that this is the only code point affected. It's possible a better fix would be inside of lower-level encoding code, such that rb_enc_isprint would return false and not true for codepoint 0x85. Fixes [Bug #16842] Notes: Merged: https://github.com/ruby/ruby/pull/4229
2022-08-11[ruby/rdoc] [DOC] Make example formats explicit and consistent ↵Burdette Lamar
(https://github.com/ruby/rdoc/pull/913) https://github.com/ruby/rdoc/commit/7e6ef6c855
2022-08-11Fix Array#[] with ArithmeticSequence with negative steps (#5739)Jeremy Evans
* Fix Array#[] with ArithmeticSequence with negative steps Previously, Array#[] when called with an ArithmeticSequence with a negative step did not handle all cases correctly, especially cases involving infinite ranges, inverted ranges, and/or exclusive ends. Fixes [Bug #18247] * Add Array#slice tests for ArithmeticSequence with negative step to test_array Add tests of rb_arithmetic_sequence_beg_len_step C-API function. * Fix ext/-test-/arith_seq/beg_len_step/depend * Rename local variables * Fix a variable name Co-authored-by: Kenta Murata <3959+mrkn@users.noreply.github.com> Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
2022-08-11Fix race conditions when cleaning extensionsNobuyoshi Nakada
Clean built directories by `make distclean`, and then clean leftover makefiles for skipped extensions.
2022-08-11The "gems" build directory was rename as ".bundle"Nobuyoshi Nakada
2022-08-11Fix paths of exts.mk to cleanNobuyoshi Nakada
exts.mk files are one level under the top of extension directories.
2022-08-11Add `--enable-devel` configure optionNobuyoshi Nakada
Since `RUBY_DEVEL` in cppflags has no effect in the configure script and makefiles. Notes: Merged: https://github.com/ruby/ruby/pull/6230
2022-08-11[ruby/rdoc] Treat text markup (italic, bold, monofont) as blocks ↵Burdette Lamar
(https://github.com/ruby/rdoc/pull/911) https://github.com/ruby/rdoc/commit/dc88f1b425
2022-08-10Revert "Add {Method,UnboundMethod}#{public?,private?,protected?}"Jeremy Evans
This reverts commit 27278150685e738f84105d09843d3ba371146c7a and 58dc8bf8f15df9a33d191074e8a5d4946a3d59d5. Visibility is an attribute of the method entry in a class, not an attribute of the Method object. Fixes [#18729] Fixes [#18751] Fixes [#18435] Notes: Merged: https://github.com/ruby/ruby/pull/5974
2022-08-10Only allow procs created by Symbol#to_proc to call public methodsJeremy Evans
Fixes [Bug #18826] Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/6018 Merged-By: jeremyevans <code@jeremyevans.net>
2022-08-11* 2022-08-11 [ci skip]git
2022-08-10[DOC] Adding a few standards-based formats (#6227)Burdette Lamar
Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-08-10Bundle unreleased RBS (#6228)Soutaro Matsumoto
Notes: Merged-By: soutaro <matsumoto@soutaro.com>
2022-08-10Update default gems list at 1b32a4c7bb2e1ceb456b191ca88289 [ci skip]git
2022-08-10[ruby/error_highlight] Bump versionYusuke Endoh
https://github.com/ruby/error_highlight/commit/6edf0a0a5d
2022-08-10[ruby/error_highlight] Make backtrace_location keyword workYusuke Endoh
We had to keep backtrace_location before opts is overwritten. https://github.com/ruby/error_highlight/commit/2735e4681a
2022-08-10[ruby/error_highlight] Make ErrorHighlight.spot accept Exception ↵Yusuke Endoh
(https://github.com/ruby/error_highlight/pull/25) ... and move things from core_ext.rb to base.rb. This will confine CRuby-dependent things to ErrorHighlight.spot. https://github.com/ruby/error_highlight/commit/22d1dd7824
2022-08-10Update bundled gems list at 2022-08-10git
2022-08-09Regen YJIT bindingsJeremy Evans
Notes: Merged: https://github.com/ruby/ruby/pull/6158
2022-08-09Optimize duparray/expandarray -> putobject/expandarrayJeremy Evans
There's no point in making a copy of an array just to expand it. Saves an unnecessary array allocation in the multiple assignment case, with a 35-84% improvement in affected cases in benchmark/masgn.yml. Notes: Merged: https://github.com/ruby/ruby/pull/6158
2022-08-09Expand newarray/expandarray optimization for unequal operandsJeremy Evans
This optimizes unbalanced multiple assignment cases such as: ```ruby a.b, c.d = e, f, g a.b, c.d, e.f = g, h ``` Previously, this would use: ``` newarray(3) expandarray(2, 0) newarray(2) expandarray(3, 0) ``` These would both allocate arrays. This switches to opt_reverse with either pop or putnil: ``` pop opt_reverse(2) putnil opt_reverse(3) ``` This avoids an unnecessary array allocation, and results in a 35-76% performance increase in these types of unbalanced cases (tested with benchmark/masgn.yml). Notes: Merged: https://github.com/ruby/ruby/pull/6158
2022-08-09Update multiple assignment benchmarks to include non-literal array casesJeremy Evans
This allows them to show the effect of the previous newarray/expandarray to swap/opt_reverse optimization. This shows an 35-83% performance improvement in the four multiple assignment benchmarks that use this optimization. Notes: Merged: https://github.com/ruby/ruby/pull/6158
2022-08-09Add peephole optimizer for newarray(X)/expandarray(X, 0) -> opt_reverse(X)Jeremy Evans
This renames the reverse instruction to opt_reverse, since now it is only added by the optimizer. Then it uses as a more general form of swap. This optimizes multiple assignment in the popped case with more than two elements. Notes: Merged: https://github.com/ruby/ruby/pull/6158
2022-08-09Revert "Remove reverse VM instruction"Jeremy Evans
This reverts commit 5512353d97250e85c13bf10b9b32e750478cf474. Notes: Merged: https://github.com/ruby/ruby/pull/6158
2022-08-09Add peephole optimizer for newarray(2)/expandarray(2, 0) -> swapJeremy Evans
An optimization for multiple assignment in the popped case to avoid array allocation was lost in my fix to make multiple assignment follow left-to-right evaluation (50c54d40a81bb2a4794a6be5f1861152900b4fed). Before, in the two element case, swap was used. Afterward, newarray(2) and expandarray(2, 0) were used, which is the same as swap, with the addition of an unnecessary allocation. Because this issue is not specific to multiple assignment, and the multiple assignment code is complex enough as it is, this updates the peephole optimizer to do the newarray(2)/expandarray(2, 0) -> swap conversion. A more general optimization pass for newarray(X)/expandarray(X, 0) -> reverse(X) will follow, but that requires readding the reverse instruction. Notes: Merged: https://github.com/ruby/ruby/pull/6158
2022-08-10* 2022-08-10 [ci skip]git
2022-08-09Do not enable RUBY_DEVEL by RUBY_PATCHLEVELJeremy Evans
This makes RUBY_DEVEL not enabled automatically. It still can be enabled manually. Test manually using RUBY_DEVEL in CI. Implements [Feature #17468] Notes: Merged: https://github.com/ruby/ruby/pull/4993
2022-08-09Skip poisoned regionsNobuyoshi Nakada
Poisoned regions cannot be accessed without unpoisoning outside gc.c. Specifically, debug.gem is terminated by AddressSanitizer. ``` SUMMARY: AddressSanitizer: use-after-poison iseq_collector.c:39 in iseq_i ```