summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-11-12Update default gems list at 9c5290138a52f1c78c01e135e2cc65 [ci skip]git
2024-11-12[ruby/zlib] Bump up v3.2.0Hiroshi SHIBATA
https://github.com/ruby/zlib/commit/7bb6d982fe
2024-11-11.gdbinit: Update RString printing for new layout [ci skip]Alan Wu
2024-11-11.gdbinit: Have rp() work without a target [ci skip]Alan Wu
Useful for core dumps. It used to not work because: (gdb) p !"" evaluation of this expression requires the target program to be active (gdb) p 0 == "" evaluation of this expression requires the target program to be active
2024-11-12Fix commit miss [ci skip]Nobuyoshi Nakada
2024-11-12[DOC] `--with-opt-dir` options and `CONFIGURE_ARGS`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12059
2024-11-12CI: check_dependencies.yml is now required [ci skip]Nobuyoshi Nakada
`paths-ignore` cannot be used for required status checks.
2024-11-12[ruby/pp] Fixed file list for pp gemHiroshi SHIBATA
https://github.com/ruby/pp/commit/b192896a1d
2024-11-12Removed unused variableHiroshi SHIBATA
2024-11-12Update default gems list at 400f78939cbe0b7ab8790062598fd8 [ci skip]git
2024-11-12[ruby/pp] Bump up v0.6.0Hiroshi SHIBATA
https://github.com/ruby/pp/commit/af2229e8e6
2024-11-12[ruby/pp] Handle BasicObjectJean Boussier
Right now attempting to pretty print a BasicObject or any other object lacking a few core Object methods will result in an error ``` Error: test_basic_object(PPTestModule::PPInspectTest): NoMethodError: undefined method `is_a?' for an instance of BasicObject lib/pp.rb:192:in `pp' lib/pp.rb:97:in `block in pp' lib/pp.rb:158:in `guard_inspect_key' lib/pp.rb:97:in `pp' test/test_pp.rb:131:in `test_basic_object' 128: 129: def test_basic_object 130: a = BasicObject.new => 131: assert_match(/\A#<BasicObject:0x[\da-f]+>\n\z/, PP.pp(a, ''.dup)) 132: end 133: end 134: ``` With some fairly small changes we can fallback to `Object#inspect` which is better than an error. https://github.com/ruby/pp/commit/4e9f6c2de0
2024-11-12[ruby/pp] Data#pretty_print handle privated or removed membersJean Boussier
[Bug #20808] The previous implementation assumed all members are accessible, but it's possible for users to change the visibility of members or to entirely remove the accessor. https://github.com/ruby/pp/commit/fb19501434
2024-11-12[Feature #120782] Introduction of Happy Eyeballs Version 2 (RFC8305) in ↵Misaki Shioi
TCPSocket.new (#11653) * Introduction of Happy Eyeballs Version 2 (RFC8305) in TCPSocket.new This is an implementation of Happy Eyeballs version 2 (RFC 8305) in `TCPSocket.new`. See https://github.com/ruby/ruby/pull/11653 1. Background Prior to this implementation, I implemented Happy Eyeballs Version 2 (HEv2) for `Socket.tcp` in https://github.com/ruby/ruby/pull/9374. HEv2 is an algorithm defined in [RFC 8305](https://datatracker.ietf.org/doc/html/rfc8305), aimed at improving network connectivity. For more details on the specific cases that HEv2 helps, please refer to https://bugs.ruby-lang.org/issues/20108. 2. Proposal & Outcome This proposal implements the same HEv2 algorithm in `TCPSocket.new`. Since `TCPSocket.new` is used more widely than `Socket.tcp`, this change is expected to broaden the impact of HEv2's benefits. Like `Socket.tcp`, I have also added `fast_fallback` keyword argument to `TCPSocket.new`. This option is set to true by default, enabling the HEv2 functionality. However, users can explicitly set it to false to disable HEv2 and use the previous behavior of `TCPSocket.new`. It should be noted that HEv2 is enabled only in environments where pthreads are available. This specification follows the approach taken in https://bugs.ruby-lang.org/issues/19965 , where name resolution can be interrupted. (In environments where pthreads are not available, the `fast_fallback` option is ignored.) 3. Performance Below is the benchmark of 100 requests to `www.ruby-lang.org` with the fast_fallback option set to true and false, respectively. While there is a slight performance degradation when HEv2 is enabled, the degradation is smaller compared to that seen in `Socket.tcp`. ``` ~/s/build ❯❯❯ ../install/bin/ruby ../ruby/test.rb Rehearsal -------------------------------------------------------- fast_fallback: true 0.017588 0.097045 0.114633 ( 1.460664) fast_fallback: false 0.014033 0.078984 0.093017 ( 1.413951) ----------------------------------------------- total: 0.207650sec user system total real fast_fallback: true 0.020891 0.124054 0.144945 ( 1.473816) fast_fallback: false 0.018392 0.110852 0.129244 ( 1.466014) ``` * Update debug prints Co-authored-by: Nobuyoshi Nakada <nobu.nakada@gmail.com> * Remove debug prints * misc * Disable HEv2 in Win * Raise resolution error with hostname resolution * Fix to handle errors * Remove warnings * Errors that do not need to be handled * misc * Improve doc * Fix bug on cancellation * Avoid EAI_ADDRFAMILY for resolving IPv6 * Follow upstream * misc * Refactor connection_attempt_fds management - Introduced allocate_connection_attempt_fds and reallocate_connection_attempt_fds for improved memory allocation of connection_attempt_fds - Added remove_connection_attempt_fd to resize connection_attempt_fds dynamically. - Simplified the in_progress_fds function to only check the size of connection_attempt_fds. * Rename do_pthread_create to raddrinfo_pthread_create to avoid conflicting --------- Co-authored-by: Nobuyoshi Nakada <nobu.nakada@gmail.com> Notes: Merged-By: shioimm <shioi.mm@gmail.com>
2024-11-11YJIT: Probe away from the heap when requesting exec memoryAlan Wu
I was looking at some crash reports and noticed that many have a line like the following for YJIT code memory: <addr>-<addr> r-xp 00000000 00:00 0 [heap] I guess YJIT confused the kernel into thinking this region is from sbrk(). While this seems to have no consequences beyond mislabeling, it's still a little concerning. Probe downwards instead. Notes: Merged: https://github.com/ruby/ruby/pull/12058
2024-11-11Fix false-positive memory leak using Valgrind in YJIT (#12057)Peter Zhu
When we run with RUBY_FREE_AT_EXIT, there's a false-positive memory leak reported in YJIT because the METHOD_CODEGEN_TABLE is never freed. This commit adds rb_yjit_free_at_exit that is called at shutdown when RUBY_FREE_AT_EXIT is set. Reported memory leak: ==699816== 1,104 bytes in 1 blocks are possibly lost in loss record 1 of 1 ==699816== at 0x484680F: malloc (vg_replace_malloc.c:446) ==699816== by 0x155B3E: UnknownInlinedFun (unix.rs:14) ==699816== by 0x155B3E: UnknownInlinedFun (stats.rs:36) ==699816== by 0x155B3E: UnknownInlinedFun (stats.rs:27) ==699816== by 0x155B3E: alloc (alloc.rs:98) ==699816== by 0x155B3E: alloc_impl (alloc.rs:181) ==699816== by 0x155B3E: allocate (alloc.rs:241) ==699816== by 0x155B3E: do_alloc<alloc::alloc::Global> (alloc.rs:15) ==699816== by 0x155B3E: new_uninitialized<alloc::alloc::Global> (mod.rs:1750) ==699816== by 0x155B3E: fallible_with_capacity<alloc::alloc::Global> (mod.rs:1788) ==699816== by 0x155B3E: prepare_resize<alloc::alloc::Global> (mod.rs:2864) ==699816== by 0x155B3E: resize_inner<alloc::alloc::Global> (mod.rs:3060) ==699816== by 0x155B3E: reserve_rehash_inner<alloc::alloc::Global> (mod.rs:2950) ==699816== by 0x155B3E: hashbrown::raw::RawTable<T,A>::reserve_rehash (mod.rs:1231) ==699816== by 0x5BC39F: UnknownInlinedFun (mod.rs:1179) ==699816== by 0x5BC39F: find_or_find_insert_slot<(usize, fn(&mut yjit::codegen::JITState, &mut yjit::backend::ir::Assembler, *const yjit::cruby::autogened::rb_callinfo, *const yjit::cruby::autogened::rb_callable_method_entry_struct, core::option::Option<yjit::codegen::BlockHandler>, i32, core::option::Option<yjit::cruby::VALUE>) -> bool), alloc::alloc::Global, hashbrown::map::equivalent_key::{closure_env#0}<usize, usize, fn(&mut yjit::codegen::JITState, &mut yjit::backend::ir::Assembler, *const yjit::cruby::autogened::rb_callinfo, *const yjit::cruby::autogened::rb_callable_method_entry_struct, core::option::Option<yjit::codegen::BlockHandler>, i32, core::option::Option<yjit::cruby::VALUE>) -> bool>, hashbrown::map::make_hasher::{closure_env#0}<usize, fn(&mut yjit::codegen::JITState, &mut yjit::backend::ir::Assembler, *const yjit::cruby::autogened::rb_callinfo, *const yjit::cruby::autogened::rb_callable_method_entry_struct, core::option::Option<yjit::codegen::BlockHandler>, i32, core::option::Option<yjit::cruby::VALUE>) -> bool, std::hash::random::RandomState>> (mod.rs:1413) ==699816== by 0x5BC39F: hashbrown::map::HashMap<K,V,S,A>::insert (map.rs:1754) ==699816== by 0x57C5C6: insert<usize, fn(&mut yjit::codegen::JITState, &mut yjit::backend::ir::Assembler, *const yjit::cruby::autogened::rb_callinfo, *const yjit::cruby::autogened::rb_callable_method_entry_struct, core::option::Option<yjit::codegen::BlockHandler>, i32, core::option::Option<yjit::cruby::VALUE>) -> bool, std::hash::random::RandomState> (map.rs:1104) ==699816== by 0x57C5C6: yjit::codegen::reg_method_codegen (codegen.rs:10521) ==699816== by 0x57C295: yjit::codegen::yjit_reg_method_codegen_fns (codegen.rs:10464) ==699816== by 0x5C6B07: rb_yjit_init (yjit.rs:40) ==699816== by 0x393723: ruby_opt_init (ruby.c:1820) ==699816== by 0x393723: ruby_opt_init (ruby.c:1767) ==699816== by 0x3957D4: prism_script (ruby.c:2215) ==699816== by 0x3957D4: process_options (ruby.c:2538) ==699816== by 0x396065: ruby_process_options (ruby.c:3166) ==699816== by 0x236E56: ruby_options (eval.c:117) ==699816== by 0x15BAED: rb_main (main.c:43) ==699816== by 0x15BAED: main (main.c:62) After this patch, there are no more memory leaks reported when running RUBY_FREE_AT_EXIT with Valgrind on an empty Ruby script: $ RUBY_FREE_AT_EXIT=1 valgrind --leak-check=full ruby -e "" ... ==700357== HEAP SUMMARY: ==700357== in use at exit: 0 bytes in 0 blocks ==700357== total heap usage: 36,559 allocs, 36,559 frees, 6,064,783 bytes allocated ==700357== ==700357== All heap blocks were freed -- no leaks are possible Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2024-11-11[ruby/json] Fix $VERBOSE restorePeter Zhu
Manually sync this commit that was missed. https://github.com/ruby/json/commit/6ae9155
2024-11-11[rubygems/rubygems] Add a `lockfile_checksums` configuration to include ↵David Rodríguez
checksums in fresh lockfiles https://github.com/rubygems/rubygems/commit/50b9ef8589
2024-11-11Make ObjectSpace::WeakMap#[]= return QnilPeter Zhu
Instead of returning some obscure value in ObjectSpace::WeakMap#[]= that's not even useful, we can just simply return Qnil. Notes: Merged: https://github.com/ruby/ruby/pull/12037
2024-11-11[DOC] Tweaks for array indexesBurdetteLamar
Notes: Merged: https://github.com/ruby/ruby/pull/12044
2024-11-11[DOC] Sort items in What's HereBurdetteLamar
Notes: Merged: https://github.com/ruby/ruby/pull/12039
2024-11-11[ruby/reline] Refactor perform_completontomoya ishida
(https://github.com/ruby/reline/pull/778) Flatten recursive method Remove CompletionState::COMPLETE https://github.com/ruby/reline/commit/aa5b278f3d
2024-11-11[DOC] Tweaks for Array#|BurdetteLamar
Notes: Merged: https://github.com/ruby/ruby/pull/12038
2024-11-11[rubygems/rubygems] Cancel `bundle console` deprecationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/506a863b36
2024-11-11Added -j2Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12051
2024-11-11Fixed dependencies nameHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12051
2024-11-11Use cygwin RubyHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12051
2024-11-11Try to build with CygwinHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12051
2024-11-11Update default gems list at 461fa56e1014d00c03f459ef6afc2c [ci skip]git
2024-11-11[ruby/securerandom] Bump up v0.3.2Hiroshi SHIBATA
https://github.com/ruby/securerandom/commit/9703d96a76
2024-11-11Bump github/codeql-action from 3.27.0 to 3.27.1dependabot[bot]
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.0 to 3.27.1. - [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/662472033e021d55d94146f66f6058822b0b39fd...4f3212b61783c3c68e8309a0f18a699764811cda) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Notes: Merged: https://github.com/ruby/ruby/pull/12049
2024-11-11Update default gems list at a6ad6f350d7607103c5591402fc1a2 [ci skip]git
2024-11-11[ruby/resolv] Bump up v0.5.0Hiroshi SHIBATA
https://github.com/ruby/resolv/commit/c4837aae9b
2024-11-11[ruby/uri] Fix minor typo fromJoe Rafaniello
https://github.com/ruby/uri/commit/9997c1acee https://github.com/ruby/uri/commit/c191b627cb
2024-11-11Update default gems list at bb6a3edadfd71b712acd8c375cd127 [ci skip]git
2024-11-11Bump vendored uri to 1.0.1David Rodríguez
2024-11-11[ruby/psych] Bump up v5.2.0Hiroshi SHIBATA
https://github.com/ruby/psych/commit/6ea07fdadd
2024-11-11[ruby/psych] Bump up v5.2.0.beta7Hiroshi SHIBATA
https://github.com/ruby/psych/commit/6609955e68
2024-11-11[ruby/psych] Bump up v5.2.0.beta6Hiroshi SHIBATA
https://github.com/ruby/psych/commit/b89064efa5
2024-11-11[ruby/psych] Bump up v5.2.0.beta5Hiroshi SHIBATA
https://github.com/ruby/psych/commit/48e5af8454
2024-11-11[ruby/psych] Bump up v5.2.0.beta4Hiroshi SHIBATA
https://github.com/ruby/psych/commit/288febbc87
2024-11-11[ruby/json] JSON.load_file: explictly load the file as UTF-8Jean Boussier
Fix: https://github.com/ruby/json/issues/697 This way even if `Encoding.default_external` is set to a weird value the document will be parsed just fine. https://github.com/ruby/json/commit/3a8505a8fa
2024-11-11[ruby/json] Rename parse_float into parse_numberJean Boussier
https://github.com/ruby/json/commit/e51e796697
2024-11-11[ruby/json] Reduce comparisons when parsing numbersAaron Patterson
Before this commit, we would try to scan for a float, then if that failed, scan for an integer. But floats and integers have many bytes in common, so we would end up scanning the same bytes multiple times. This patch combines integer and float scanning machines so that we only have to scan bytes once. If the machine finds "float parts", then it executes the "isFloat" transition in the machine, which sets a boolean letting us know that the parser found a float. If we didn't find a float, but we did match, then we know it's an int. https://github.com/ruby/json/commit/0c0e0930cd
2024-11-11[ruby/json] Release 2.8.1Jean Boussier
https://github.com/ruby/json/commit/49650f7312
2024-11-11[ruby/json] Fix gemspec to include .jar filesJean Boussier
Fix: https://github.com/ruby/json/issues/694 This was lost during the .gemspec merge and not noticed because it was falling back to loading the jars from the stdlib. https://github.com/ruby/json/commit/07cf261251
2024-11-11Bump versionSutou Kouhei
2024-11-11[ruby/fiddle] Accept Symbol as Function name againSutou Kouhei
GitHub: fix https://github.com/ruby/fiddle/pull/159 It's used by FFI test. So Symbol may be used by other use cases. https://github.com/ruby/fiddle/pull/139 introduced the "Function name is String" limitation. This commit removed the limitation. Reported by Mamoru TASAKA. Thanks!!! https://github.com/ruby/fiddle/commit/cea30fe5f9
2024-11-10[ruby/reline] Remove unused things from reline/unicode.rbtomoya ishida
(https://github.com/ruby/reline/pull/759) * Remove garbage(nil) from Reline::Unicode.split_by_width result * Remove unused width from Reline::Unicode vi_ ed_ em_ method return value * Remove unused height from Unicode.split_by_width return value * Rename split_by_width to split_line_by_width and add legacy split_by_width for IRB https://github.com/ruby/reline/commit/f32446ebc4
2024-11-10rb_strlen_lit: support wide string literalsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12046