summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-12-03Lock json-schema-5.1.0Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12232
2024-12-02[ruby/rdoc] Prefer String#ord to #codepoints[0]Mike Dalessio
(https://github.com/ruby/rdoc/pull/1220) https://github.com/ruby/rdoc/commit/09d7f35420 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2024-12-02[ruby/rdoc] ClassModule#superclass= accepts a ClassModule as anMike Dalessio
argument (https://github.com/ruby/rdoc/pull/1222) It is necessary for ClassModule's instance variable @superclass to always be a String (or nil) so that the class can be saved with `#marshal_dump` and loaded with `#marshal_load`. However, there's no type checking being done, which allows a bug like the one reported in #1221 (which was introduced in #1217) that sets superclass to a ClassModule. That bug requires: - setting a superclass to a NormalClass - marshal_save - marshal_load (which raises an exception) With this change, passing a ClassModule to ClassModule#superclass= is explicitly allowed by saving the full name of the ClassModule in the @superclass instance variable. https://github.com/ruby/rdoc/commit/9ced6d534c
2024-12-02Correct order of listed methodsBurdetteLamar
Notes: Merged: https://github.com/ruby/ruby/pull/12229
2024-12-02[ruby/prism] _finitef is unavailable on Windows x86Kevin Newton
Instead cast it inline to a double on Windows. https://github.com/ruby/prism/commit/9064d872aa
2024-12-02[DOC] Fix capitalization in NEWS.mdPeter Zhu
2024-12-02[ruby/prism] Reject invalid operator after match predicate or after match ↵ydah
required Partially fixes: #3171 https://github.com/ruby/prism/commit/d0d9699c27
2024-12-02[ruby/prism] Reject invalid dot method call after match predicate or after ↵ydah
match required Partially fixes: https://github.com/ruby/prism/issues/3171 https://github.com/ruby/prism/commit/5c33fa5a1a
2024-12-02[ruby/prism] Reject extra comma in array after keyword argumentydah
Fixes: https://github.com/ruby/prism/issues/3109 https://github.com/ruby/prism/commit/9ed989c30d
2024-12-02Fix example of array pattern that results in a SyntaxErrorydah
``` ❯ ruby --parser=prism --dump=parsetree -e "foo in *1" ruby: -e:1: syntax error found (SyntaxError) > 1 | foo in *1 | ^ unexpected integer, expecting end-of-input 2 | ```
2024-12-02[ruby/prism] Add document BeginNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/b8f40988ab
2024-12-02[ruby/prism] Add document ArrayPatternNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/396c6d4340
2024-12-02[ruby/prism] Add document AliasMethodNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/27f13fabc6
2024-12-02[ruby/prism] Add document ArgumentsNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/1388ca389e
2024-12-02[ruby/prism] Add document BlockArgumentNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/b1c2f323f9
2024-12-02[ruby/prism] Add document BlockLocalVariableNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/8353be1dfe
2024-12-02[ruby/prism] Add document BlockNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/9c0ef71449
2024-12-02[ruby/prism] Add document BlockParameterNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/480897eccf
2024-12-02[ruby/prism] Add document BlockParametersNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/75d1bde6cc
2024-12-02[ruby/prism] Add document CallAndWriteNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/d1570f2e06
2024-12-02[ruby/prism] Add document CallNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/145ae8f993
2024-12-02[ruby/reline] Implement buffered output to Reline::ANSItomoya ishida
(https://github.com/ruby/reline/pull/790) Minimize the call of STDOUT.write This will improve rendering performance especially when there is a busy thread `Thread.new{loop{}}` https://github.com/ruby/reline/commit/a6fe45f5ba
2024-12-02[rubygems/rubygems] [DOC] Fix missing single quoteNobuyoshi Nakada
https://github.com/rubygems/rubygems/commit/722d4c6926
2024-12-02Avoid test failures on hosts that only support IPv4 (#12213)Misaki Shioi
To verify the behavior of HEv2, some tests were prepared. But unexpected failures occur in certain environments. This happens in environments where "localhost" resolves only to an IPv4 address during tests that verify connections to IPv6. For example, the following situation can occur: - The server process is bound to ::1. - The client socket always resolves "localhost" to 127.0.0.1 and attempts to connect to 127.0.0.1. - Since no server is bound to 127.0.0.1, an ECONNREFUSED error is raised. In such situations, the behavior of `TCPSocket.new` remains unchanged from before the introduction of HEv2. (The failures occur because tests explicitly binding to ::1 were added to verify HEv2 behavior.) This change ensures that the affected tests are skipped in environments of this kind. Notes: Merged-By: shioimm <shioi.mm@gmail.com>
2024-12-02Update default gems list at 2b895a7ad53d025e91566c4f51eac3 [ci skip]git
2024-12-02[ruby/net-http] Bump up 0.6.0Hiroshi SHIBATA
https://github.com/ruby/net-http/commit/6475fa68ba
2024-12-02Update default gems list at 157fe74795b151413150b0f79b9b8b [ci skip]git
2024-12-02[ruby/logger] Bump up 1.6.2Hiroshi SHIBATA
https://github.com/ruby/logger/commit/2d07f086f8
2024-12-02[ruby/io-console] Add IO#ttyname that returns the tty name or nilNobuyoshi Nakada
https://github.com/ruby/io-console/commit/fdad351501
2024-12-02Update default gems list at 229592f175eab0a42071bdd237107b [ci skip]git
2024-12-02[ruby/date] Bump up 3.4.1Hiroshi SHIBATA
https://github.com/ruby/date/commit/a3295ad262
2024-12-02Update default gems list at ff52431ee5a9bdefa8240e69ea4220 [ci skip]git
2024-12-02[ruby/securerandom] Bump up 0.4.0Hiroshi SHIBATA
https://github.com/ruby/securerandom/commit/53f97f3151
2024-12-02Disabled test_s_random_bytes_is_fork_safe againHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12231
2024-12-02[ruby/securerandom] Enabled test_s_random_bytes_is_fork_safe with Apple ↵Hiroshi SHIBATA
Silicon and expand running times https://github.com/ruby/securerandom/commit/40ddef8a83 Notes: Merged: https://github.com/ruby/ruby/pull/12231
2024-12-02[ruby/securerandom] Random::Formatter is only provided from Ruby 3.1Hiroshi SHIBATA
https://github.com/ruby/securerandom/commit/90c7e390f5 Notes: Merged: https://github.com/ruby/ruby/pull/12231
2024-12-02[ruby/securerandom] Enabled test_s_random_bytes_is_fork_safe on GitHub ActionsHiroshi SHIBATA
https://github.com/ruby/securerandom/commit/bb1c078e9f Notes: Merged: https://github.com/ruby/ruby/pull/12231
2024-12-02[ruby/securerandom] Removed unnecessary module for SecureRandom testsHiroshi SHIBATA
https://github.com/ruby/securerandom/commit/da7d324c7d Notes: Merged: https://github.com/ruby/ruby/pull/12231
2024-12-02[ruby/io-console] Freeze the version stringNobuyoshi Nakada
https://github.com/ruby/io-console/commit/aa79919f79
2024-12-02[ruby/io-console] Check if `rb_syserr_fail_str` is availableNobuyoshi Nakada
Truffle ruby seems to lack it. https://github.com/ruby/io-console/commit/839c1e80eb
2024-12-02Removed trailing spacesHiroshi SHIBATA
2024-12-02Update strscan structure for strscan/strscan.rbHiroshi SHIBATA
2024-12-02[ruby/strscan] test: don't omit "(...)" for method calls that have at least ↵Sutou Kouhei
one argument https://github.com/ruby/strscan/commit/dddae9c99a
2024-12-02[ruby/strscan] Micro optimize encoding checksJean Boussier
(https://github.com/ruby/strscan/pull/117) Profiling shows a lot of time spent in various encoding check functions. I'm working on optimizing them on the Ruby side, but if we assume most strings are one of the simple 3 encodings, we can skip a lot of overhead. ```ruby require 'strscan' require 'benchmark/ips' source = 10_000.times.map { rand(9999999).to_s }.join(",").force_encoding(Encoding::UTF_8).freeze def scan_to_i(source) scanner = StringScanner.new(source) while number = scanner.scan(/\d+/) number.to_i scanner.skip(",") end end def scan_integer(source) scanner = StringScanner.new(source) while scanner.scan_integer scanner.skip(",") end end Benchmark.ips do |x| x.report("scan.to_i") { scan_to_i(source) } x.report("scan_integer") { scan_integer(source) } x.compare! end ``` Before: ``` ruby 3.3.4 (2024-07-09 revision https://github.com/ruby/strscan/commit/be1089c8ec) +YJIT [arm64-darwin23] Warming up -------------------------------------- scan.to_i 93.000 i/100ms scan_integer 232.000 i/100ms Calculating ------------------------------------- scan.to_i 933.191 (± 0.2%) i/s (1.07 ms/i) - 4.743k in 5.082597s scan_integer 2.326k (± 0.8%) i/s (429.99 μs/i) - 11.832k in 5.087974s Comparison: scan_integer: 2325.6 i/s scan.to_i: 933.2 i/s - 2.49x slower ``` After: ``` ruby 3.3.4 (2024-07-09 revision https://github.com/ruby/strscan/commit/be1089c8ec) +YJIT [arm64-darwin23] Warming up -------------------------------------- scan.to_i 96.000 i/100ms scan_integer 274.000 i/100ms Calculating ------------------------------------- scan.to_i 969.489 (± 0.2%) i/s (1.03 ms/i) - 4.896k in 5.050114s scan_integer 2.756k (± 0.1%) i/s (362.88 μs/i) - 13.974k in 5.070837s Comparison: scan_integer: 2755.8 i/s scan.to_i: 969.5 i/s - 2.84x slower ``` https://github.com/ruby/strscan/commit/c02b1ce684
2024-12-02StringScanner#scan_integer support base 16 integers (#116)Jean Boussier
Followup: https://github.com/ruby/strscan/pull/115 `scan_integer` is now implemented in Ruby as to efficiently handle keyword arguments without allocating a Hash. Given the goal of `scan_integer` is to more effciently parse integers without having to allocate an intermediary object, using `rb_scan_args` would defeat the purpose. Additionally, the C implementation now uses `rb_isdigit` and `rb_isxdigit`, because on Windows `isdigit` is locale dependent.
2024-12-02[ruby/strscan] Prevent a warning "ambiguous first argument" during aYusuke Endoh
test (https://github.com/ruby/strscan/pull/118) https://rubyci.s3.amazonaws.com/debian11/ruby-master/log/20241128T153002Z.log.html.gz ``` /home/chkbuild/chkbuild/tmp/build/20241128T153002Z/ruby/test/strscan/test_stringscanner.rb:908: warning: ambiguous first argument; put parentheses or a space even after `-` operator ``` https://github.com/ruby/strscan/commit/af3fd2f045
2024-12-02TypofixHiroshi SHIBATA
2024-12-02Revert "[ruby/rdoc] fix: C variables should never show up in Ancestors tree"Hiroshi SHIBATA
This reverts commit 2923f42ed7622f6310c63aab4c0abf05402f9a04. https://github.com/ruby/actions/actions/runs/12108034481/job/33755653615#step:23:1031 ``` /home/runner/work/actions/actions/snapshot-master/lib/rdoc/code_object.rb:322:in 'RDoc::CodeObject#parent': undefined method 'find_class_or_module' for nil (NoMethodError) from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/code_object/class_module.rb:342:in 'RDoc::ClassModule#marshal_dump' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:878:in 'Marshal.dump' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:878:in 'block in RDoc::Store#save_class' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:877:in 'IO.open' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:877:in 'RDoc::Store#save_class' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:763:in 'block in RDoc::Store#save' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:762:in 'Array#each' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:762:in 'RDoc::Store#save' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/generator/ri.rb:27:in 'RDoc::Generator::RI#generate' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/rdoc.rb:528:in 'block in RDoc::RDoc#generate' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/rdoc.rb:522:in 'Dir.chdir' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/rdoc.rb:522:in 'RDoc::RDoc#generate' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/rdoc.rb:501:in 'RDoc::RDoc#document' from ./tool/rdoc-srcdir:27:in '<main>' ```
2024-12-02yasmdata.rb is no longer generated for years [ci skip]Nobuyoshi Nakada
2024-12-02[ruby/set] Fix ^ to respect subclassesKouhei Yanagita
https://github.com/ruby/set/commit/f88ecdef6b