summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-09-17Removed accidentally commit for snapshot file of prismHiroshi SHIBATA
2024-09-17[ruby/strscan] Accept String as a pattern at non headNAITOH Jun
(https://github.com/ruby/strscan/pull/106) It supports non-head match cases such as StringScanner#scan_until. If we use a String as a pattern, we can improve match performance. Here is a result of the including benchmark. ## CRuby It shows String as a pattern is 1.18x faster than Regexp as a pattern. ``` $ benchmark-driver benchmark/check_until.yaml Warming up -------------------------------------- regexp 9.403M i/s - 9.548M times in 1.015459s (106.35ns/i) regexp_var 9.162M i/s - 9.248M times in 1.009479s (109.15ns/i) string 8.966M i/s - 9.274M times in 1.034343s (111.54ns/i) string_var 11.051M i/s - 11.190M times in 1.012538s (90.49ns/i) Calculating ------------------------------------- regexp 10.319M i/s - 28.209M times in 2.733707s (96.91ns/i) regexp_var 10.032M i/s - 27.485M times in 2.739807s (99.68ns/i) string 9.681M i/s - 26.897M times in 2.778397s (103.30ns/i) string_var 12.162M i/s - 33.154M times in 2.726046s (82.22ns/i) Comparison: string_var: 12161920.6 i/s regexp: 10318949.7 i/s - 1.18x slower regexp_var: 10031617.6 i/s - 1.21x slower string: 9680843.7 i/s - 1.26x slower ``` ## JRuby It shows String as a pattern is 2.11x faster than Regexp as a pattern. ``` $ benchmark-driver benchmark/check_until.yaml Warming up -------------------------------------- regexp 7.591M i/s - 7.544M times in 0.993780s (131.74ns/i) regexp_var 6.143M i/s - 6.125M times in 0.997038s (162.77ns/i) string 14.135M i/s - 14.079M times in 0.996067s (70.75ns/i) string_var 14.079M i/s - 14.057M times in 0.998420s (71.03ns/i) Calculating ------------------------------------- regexp 9.409M i/s - 22.773M times in 2.420268s (106.28ns/i) regexp_var 10.116M i/s - 18.430M times in 1.821820s (98.85ns/i) string 21.389M i/s - 42.404M times in 1.982519s (46.75ns/i) string_var 20.897M i/s - 42.237M times in 2.021187s (47.85ns/i) Comparison: string: 21389191.1 i/s string_var: 20897327.5 i/s - 1.02x slower regexp_var: 10116464.7 i/s - 2.11x slower regexp: 9409222.3 i/s - 2.27x slower ``` See: https://github.com/jruby/jruby/blob/be7815ec02356a58891c8727bb448f0c6a826d96/core/src/main/java/org/jruby/util/StringSupport.java#L1706-L1736 --------- https://github.com/ruby/strscan/commit/f9d96c446a Co-authored-by: Sutou Kouhei <[email protected]>
2024-09-17Unlock parallel_testsDavid Rodríguez
2024-09-17[rubygems/rubygems] Fix `--local` hitting the network when default gems are ↵David Rodríguez
included https://github.com/rubygems/rubygems/commit/b9a2d4d539
2024-09-17[rubygems/rubygems] Improve specDavid Rodríguez
The behavior it's testing is independent from the bundle path being used. https://github.com/rubygems/rubygems/commit/9a4b32ec82
2024-09-17[rubygems/rubygems] Fix spec to setup a default gem correctlyDavid Rodríguez
Looking at the description is something that used to be done a long time ago. https://github.com/rubygems/rubygems/commit/9c226f52a6
2024-09-17[rubygems/rubygems] Inline a private methodDavid Rodríguez
Removes an (in my opinion) excessive indirection and handles options more consistently. https://github.com/rubygems/rubygems/commit/642e6d2c0c
2024-09-17[rubygems/rubygems] Consistently access install options through symbol keysDavid Rodríguez
https://github.com/rubygems/rubygems/commit/7ddf1dc70a
2024-09-17Prevent a warning due to error recovery of prismYusuke Endoh
2024-09-17Prevent warnings for RubyVM::AbstractSyntaxTree.parse in test_ast.rbYusuke Endoh
2024-09-17Prevent warning: assigned but unused variable - messageYusuke Endoh
2024-09-17Bump github/codeql-action from 3.26.6 to 3.26.7dependabot[bot]
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.6 to 3.26.7. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/4dd16135b69a43b6c8efb853346f8437d92d3c93...8214744c546c1e5c8f03dde8fab3a7353211988d) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Notes: Merged: https://github.com/ruby/ruby/pull/11628
2024-09-17[DOC] Fix autoload method formattingNikolay Ponomarev
Notes: Merged: https://github.com/ruby/ruby/pull/11627
2024-09-17Activate irb if irb is bundled gemsHiroshi SHIBATA
2024-09-17Prevent prism warnings in syntax exhaustive testsYusuke Endoh
[Bug #20736] Notes: Merged: https://github.com/ruby/ruby/pull/11626
2024-09-17Ensure fiber scheduler is woken up when close interrupts readKJ Tsanaktsidis
If one thread is reading and another closes that socket, the close blocks waiting for the read to abort cleanly. This ensures that Ruby is totally done with the file descriptor _BEFORE_ we tell the OS to close and potentially re-use it. When the read is correctly terminated, the close should be unblocked. That currently works if closing is happening on a thread, but if it's happening on a fiber with a fiber scheduler, it does NOT work. This patch ensures that if the close happened in a fiber scheduled thread, that the scheduler is notified that the fiber is unblocked. [Bug #20723] Notes: Merged: https://github.com/ruby/ruby/pull/11614
2024-09-16Move desired_compaction_pages_i inside of GC_CAN_COMPILE_COMPACTIONPeter Zhu
Fixes the following warning on WebAssembly: gc/default.c:7306:1: warning: unused function 'desired_compaction_pages_i' [-Wunused-function] desired_compaction_pages_i(struct heap_page *page, void *data) Notes: Merged: https://github.com/ruby/ruby/pull/11607
2024-09-16[ruby/prism] Handle retry doubly nested under rescueKevin Newton
Fixes [Bug #20747] https://github.com/ruby/prism/commit/d3194715a9
2024-09-16[ruby/prism] Do not leak explicit encodingKevin Newton
Fixes [Bug #20744] https://github.com/ruby/prism/commit/f1b8b1b2a2
2024-09-16Don't export unnecessary string functionsPeter Zhu
These functions are not used publicly, so we don't need to export them. Notes: Merged: https://github.com/ruby/ruby/pull/11634
2024-09-16[PRISM] Assume an eval context for RubyVM::ISEQ compileKevin Newton
Fixes [Bug #20741] Notes: Merged: https://github.com/ruby/ruby/pull/11632
2024-09-16[ruby/irb] Use InstructionSequence#script_lines to get method sourcetomoya ishida
(https://github.com/ruby/irb/pull/1005) It works with both prism and parse.y https://github.com/ruby/irb/commit/bcfaa72d5a
2024-09-16[DOC] Tweaks for Array#select!BurdetteLamar
Notes: Merged: https://github.com/ruby/ruby/pull/11630
2024-09-16Tweaks or Array#selectBurdetteLamar
Notes: Merged: https://github.com/ruby/ruby/pull/11629
2024-09-16[PRISM] Match defined behavior for explicit blockKevin Newton
Fixes [Bug #20748] Notes: Merged: https://github.com/ruby/ruby/pull/11633
2024-09-16ASAN unpoison whole heap page after adding to size poolPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/11623
2024-09-16Don't return inside of asan_unpoisoning_objectPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/11623
2024-09-16Replace with asan_unpoisoning_objectPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/11623
2024-09-16Complete specDavid Rodríguez
Co-authored-by: Vít Ondruch <[email protected]>
2024-09-16[rubygems/rubygems] Simplify handling default gem cachingDavid Rodríguez
By the time `cached_gem` is called, default gem cache has already been handled. So no need to try redownload it again, it's enough to check the cache location directly. https://github.com/rubygems/rubygems/commit/70e10236b6
2024-09-16[PRISM] Remove snapshot testing from Prism syncKevin Newton
Notes: Merged: https://github.com/ruby/ruby/pull/11624
2024-09-16[rubygems/rubygems] Remove temporary `.lock` files left around by gem installerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/edbb2e3475
2024-09-16[rubygems/rubygems] Make sure implementations of `Gem.open_file_with_flock` ↵David Rodríguez
match https://github.com/rubygems/rubygems/commit/174a8e5284
2024-09-15Prevent warnings: the block passed to ... may be ignoredYusuke Endoh
2024-09-15Prevent warnings: assigned but unused variableYusuke Endoh
2024-09-13[ruby/prism] Stat file first to check directoryKevin Newton
https://github.com/ruby/prism/commit/4ed7de537b
2024-09-13[ruby/prism] Expose main_script in serialization APIKevin Newton
https://github.com/ruby/prism/commit/0b527ca93f
2024-09-13[PRISM] Do not warn ambiguous ampersand when symbol literalKevin Newton
Fixes [Bug #20735] Notes: Merged: https://github.com/ruby/ruby/pull/11622
2024-09-13[PRISM] Only parse shebang on main scriptKevin Newton
Fixes [Bug #20730] Notes: Merged: https://github.com/ruby/ruby/pull/11617
2024-09-13[PRISM] Allow case/when to be indented with no warningKevin Newton
Fixes [Bug #20731] Notes: Merged: https://github.com/ruby/ruby/pull/11620
2024-09-13[PRISM] Turn off mismatched indentation warnings in evalKevin Newton
Fixes [Bug #20732] Notes: Merged: https://github.com/ruby/ruby/pull/11618
2024-09-13[ruby/prism] Refactor and move common node flags count into a constant to ↵Andrew Konchin
reuse in templates https://github.com/ruby/prism/commit/c20bf05ecc
2024-09-13[ruby/prism] Unify code style of flags generation in the nodes templatesAndrew Konchin
https://github.com/ruby/prism/commit/dbb7e0a44e
2024-09-13Ignore -Wdangling-pointer in rb_gc_set_stack_endPeter Zhu
Fixes this compiler warning: thread.c:4530:18: warning: storing the address of local variable ‘stack_end’ in ‘*stack_end_p’ [-Wdangling-pointer=] 4530 | *stack_end_p = &stack_end; | ~~~~~~~~~~~~~^~~~~~~~~~~~
2024-09-13[ruby/prism] Reverse-sync numbered reference range handlingKevin Newton
https://github.com/ruby/prism/commit/a2f57ef6e3
2024-09-13[rubygems/rubygems] Remove redundant arguments passed to `bundle` helperDavid Rodríguez
They are used by default. https://github.com/rubygems/rubygems/commit/0b7f7d879f
2024-09-13[rubygems/rubygems] Remove `BUNDLER_IGNORE_DEFAULT_GEM`David Rodríguez
As long as we use a high enough test version, the default version of Bundler should never get in the middle. https://github.com/rubygems/rubygems/commit/d63f0818aa
2024-09-13[rubygems/rubygems] Make sure test does not load system version of BundlerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d850ea1d95
2024-09-13[Bug #20725] Should not call compare on `nil`-endpointNobuyoshi Nakada
It means unbounded, always inclusive of other ranges. Notes: Merged: https://github.com/ruby/ruby/pull/11609
2024-09-13Prevent warnings "the block passed to ... may be ignored"Yusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/11611