summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2024-12-27[Bug #20984] Fix test with locale encodingNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12474
2024-12-26[Bug #20982] Put spaces in `ENV.inspect` results as well as `Hash`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12472
2024-12-26[Bug #20984] ENV.inspect should be encoding awareNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12471
2024-12-26Refine ENV testsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12470
2024-12-26"test" environment variable is unset in `setup`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12470
2024-12-26[rubygems/rubygems] Bump the rb-sys group across 2 directories with 1 updatedependabot[bot]
Bumps the rb-sys group with 1 update in the /test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib directory: [rb-sys](https://github.com/oxidize-rb/rb-sys). Bumps the rb-sys group with 1 update in the /test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example directory: [rb-sys](https://github.com/oxidize-rb/rb-sys). Updates `rb-sys` from 0.9.103 to 0.9.104 - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.103...v0.9.104) Updates `rb-sys` from 0.9.103 to 0.9.104 - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.103...v0.9.104) --- updated-dependencies: - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rb-sys - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rb-sys ... Signed-off-by: dependabot[bot] <[email protected]> https://github.com/rubygems/rubygems/commit/5f20e800c6 Notes: Merged: https://github.com/ruby/ruby/pull/12469
2024-12-25[ruby/reline] test_tty_ambiguous_width: Use Reline.test_rubybinSorah Fukumori
Same as https://github.com/ruby/reline/pull/510, 'ruby' command is not always available so don't rely on that specific name. https://github.com/ruby/reline/commit/f60199fed7
2024-12-25[ruby/rdoc] Separate patterns by `--exclude` option from defaultsNobuyoshi Nakada
(https://github.com/ruby/rdoc/pull/1251) https://github.com/ruby/rdoc/commit/a7fdc730f3
2024-12-25Removed Process::Status#& and Process::Status#>>Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12452
2024-12-25[Feature #20884] Define toplevel "Ruby" module with constantsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12451
2024-12-24Win32: Defer change of timezone name encoding after 3.4Nobuyoshi Nakada
This change will be merged into 3.5 along with other encoding, command line, environment variables, etc. Revert following commits: - bd831bcca534955533d9135d8c2f22d7ae5b9aa8 [Bug #20929] Win32: Use `wcsftime` - 1c15f641cc2bb88fa88123a11036ed58fbf9aa6d [Bug #20929] Win32: Encode timezone name in UTF-8 - 78762b52185aa80ee55c0d49b495aceed863dce2 [Bug #20929] Fix `assert_zone_encoding` Notes: Merged: https://github.com/ruby/ruby/pull/12448
2024-12-24Fix calls to require_internal in multi-ractor modelukeg
After a ractor is started (multi-ractor mode), any calls to require_internal will hang the process due to deadlock. For example, loading a new encoding will deadlock after a ractor starts. Fixes [Bug #19562] Notes: Merged: https://github.com/ruby/ruby/pull/7656
2024-12-24Merge RubyGems-3.6.2 and Bundler-2.6.2David Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/12444
2024-12-23[Bug #20978] Stringize Fiber storage keysNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12438
2024-12-23Add a test case for nested block `it`yui-knk
Notes: Merged: https://github.com/ruby/ruby/pull/12435
2024-12-23Revert "[Bug #20965] Define `it` like an ordinary argument" (#12418)Takashi Kokubun
Revert "[Bug #20965] Define `it` like an ordinary argument (#12398)" Reverts ruby/ruby#12398 as per https://bugs.ruby-lang.org/issues/20970#note-6 and https://bugs.ruby-lang.org/issues/20965#note-7. We need more time to design the intended behavior, and it's too late for Ruby 3.4. Notes: Merged-By: k0kubun <[email protected]>
2024-12-23Omit TestEval#test_outer_local_variable_under_gc_compact_stress with s390xHiroshi SHIBATA
2024-12-22[ruby/openssl] ssl: fix flaky test case ↵Kazuki Yamaguchi
test_ctx_client_session_cb_tls13_exception In the test case, the client raises an exception in the session_new_cb and may not cleanly close the connection. Let's ignore exceptions raised at the server side. Fixes: https://github.com/ruby/openssl/issues/828 https://github.com/ruby/openssl/commit/210ba0334a Notes: Merged: https://github.com/ruby/ruby/pull/12421
2024-12-22[ruby/openssl] cipher: make output buffer String independentKazuki Yamaguchi
OpenSSL::Cipher#update accepts a String as the second argument to be used as the output buffer. The buffer must be directly writable, in other words, it must not be frozen and not a shared string. rb_str_resize() does not make the String independent if the String already has the intended length. Use the rb_str_modify() family instead to check it. Fixes: https://bugs.ruby-lang.org/issues/20937 https://github.com/ruby/openssl/commit/1de3b80a46 Notes: Merged: https://github.com/ruby/ruby/pull/12421
2024-12-22[ruby/openssl] pkcs12: add PKCS12#set_macKazuki Yamaguchi
Add a binding for PKCS12_set_mac() to set MAC parameters and (re-)calculate MAC for the content. This allows generating PKCS #12 with consistent MAC parameters with different OpenSSL versions. OpenSSL 3.0 changed the default hash function used for HMAC and the KDF from SHA-1 to SHA-256. Fixes: https://github.com/ruby/openssl/issues/772 https://github.com/ruby/openssl/commit/f5ed2a74b6 Notes: Merged: https://github.com/ruby/ruby/pull/12421
2024-12-20Provide Ractor support for **Kevin Newton
Fixes [Bug #20916] Notes: Merged: https://github.com/ruby/ruby/pull/12417
2024-12-20Fix GC compaction crash when using local variables in evalPeter Zhu
If we have local variables outside of the eval, the local variables names are IDs. We convert these IDs to char * using rb_id2name. However, these char * are actually Ruby strings, which may be embedded. This means that it is not safe to rb_id2name and call any potential GC entrypoints because if a GC compaction runs, the embedded string may move and the pointer will change. For example, if you compile with `-DRGENGC_CHECK_MODE=1`, then the following script will crash: GC.auto_compact = :empty GC.stress = true o = Object.new eval("def o.m(k: 0) k end") The crash message is: test.rb:6: [BUG] Local with constant_id 1 does not exist ruby 3.4.0dev (2024-12-17T18:34:57Z prism-local-compac.. 434346726c) +PRISM [arm64-darwin24] -- C level backtrace information ------------------------------------------- miniruby(rb_print_backtrace+0x24) [0x10312fec4] vm_dump.c:823 miniruby(rb_print_backtrace) (null):0 miniruby(rb_vm_bugreport+0x2d4) [0x1031301b8] vm_dump.c:1155 miniruby(rb_bug_without_die_internal+0xa8) [0x102dd6a94] error.c:1097 miniruby(rb_bug+0x28) [0x102dd6b00] error.c:1115 miniruby(pm_lookup_local_index+0xec) [0x102d61e4c] prism_compile.c:1237 miniruby(pm_compile_node+0x45d0) [0x102d252f4] prism_compile.c:9334 miniruby(pm_compile_node+0x1864) [0x102d22588] prism_compile.c:8650 miniruby(pm_compile_node+0x65ec) [0x102d27310] prism_compile.c:9897 miniruby(pm_compile_scope_node+0x3008) [0x102d77bcc] prism_compile.c:6584 miniruby(pm_compile_node+0x5ec4) [0x102d26be8] prism_compile.c:9768 miniruby(pm_iseq_compile_node+0xac) [0x102d20bf0] prism_compile.c:10069 miniruby(pm_iseq_new_with_opt_try+0x2c) [0x102e7d088] iseq.c:1029 miniruby(rb_protect+0x108) [0x102dea9bc] eval.c:1033 miniruby(pm_iseq_new_with_opt+0x264) [0x102e7c444] iseq.c:1082 miniruby(pm_iseq_new_eval+0xec) [0x102e7c8e0] iseq.c:961 miniruby(pm_eval_make_iseq+0x594) [0x1031209cc] vm_eval.c:1770 miniruby(eval_make_iseq+0x54) [0x103120068] vm_eval.c:1799 Notes: Merged: https://github.com/ruby/ruby/pull/12374
2024-12-20[PRISM] Treat it as a local when compiling patternsMatt Valentine-House
Fixes [Bug #20973] Notes: Merged: https://github.com/ruby/ruby/pull/12408
2024-12-20[PRISM] Fix compiling popped opt_str_uminus and opt_str_freezeKazuki Yamaguchi
Put a pop as needed. This example currently causes [BUG]: $ ruby --parser=prism -e'1.times{"".freeze;nil}' -e:1: [BUG] Stack consistency error (sp: 15, bp: 14) ruby 3.4.0dev (2024-12-20T00:48:01Z master 978df259ca) +PRISM [x86_64-linux] Notes: Merged: https://github.com/ruby/ruby/pull/12410
2024-12-20Fix tests for fast_fallback (#12406)Misaki Shioi
* TCPSocket.new: Close resources in ensure * TCPSocket.new: Remove unnecessary comments * Socket.tcp: Make assert_separately in TestSocket more readable * Socket.tcp: Returning instead of exiting * Socket.tcp: Close resources in ensure * Socket.tcp: Avoid test failures on hosts that only support IPv4 Notes: Merged-By: shioimm <[email protected]>
2024-12-19ruby2_keywords warnings: Quote non-UTF8 method names fullyAlan Wu
It used to quote only part of the method name because NUL byte in the method terminates the C string: ``` (irb)> "abcdef".encode("UTF-16LE").bytes => [97, 0, 98, 0, 99, 0, 100, 0, 101, 0, 102, 0] ``` ``` expected: /abcdef/ actual: warning: Skipping set of ruby2_keywords flag for a (method not defined in Ruby)\n". ``` Notes: Merged: https://github.com/ruby/ruby/pull/12396 Merged-By: XrXr
2024-12-19[Bug #20969] Pass `assignable` from ripperNobuyoshi Nakada
For the universal parser, `rb_reg_named_capture_assign_iter_impl` function is shared between the parser and ripper. However `parser_params` struct is partially different, and `assignable` function depends on that part indirectly. Notes: Merged: https://github.com/ruby/ruby/pull/12400
2024-12-18[Bug #20965] Define `it` like an ordinary argument (#12398)Nobuyoshi Nakada
Also fixes [Bug #20955] Notes: Merged-By: k0kubun <[email protected]>
2024-12-17[ruby/rdoc] Enable cross reference in codeNobuyoshi Nakada
(https://github.com/ruby/rdoc/pull/1240) Some people like to mark up method names in MarkDown style block quotes, like this: ruby/ruby#12333. Currently, no links are created in the code in the RDoc, but such words most likely refer to methods. This PR makes a word a code cross-reference if the whole word can be resolved as a reference. https://github.com/ruby/rdoc/commit/7d7efb0709
2024-12-17[ruby/rdoc] Update tests for ruby/rdoc#1247Stan Lo
(https://github.com/ruby/rdoc/pull/1248) https://github.com/ruby/rdoc/commit/94b9858000
2024-12-17[PRISM] Recurse use_deconstructed_cache in Alternation NodesMatt Valentine-House
This fixes the behavioural difference between Prism and parse.y when evaluating the following code ```ruby 1 in [1 | [1]] ``` Fixes [Bug #20956] Notes: Merged: https://github.com/ruby/ruby/pull/12370
2024-12-17Fix indent rule by rubygems/bundler copsHiroshi SHIBATA
2024-12-16[ruby/rdoc] Print warnings for rdoc-ref links that can't be resolvedStan Lo
(https://github.com/ruby/rdoc/pull/1241) https://github.com/ruby/rdoc/commit/4a5206ae56
2024-12-16[rubygems/rubygems] Fix `gem info` tagging some non default gems as defaultDavid Rodríguez
https://github.com/rubygems/rubygems/commit/7585825c57
2024-12-16[rubygems/rubygems] Improve indentation of a `gem info` testDavid Rodríguez
https://github.com/rubygems/rubygems/commit/b0a092dac3
2024-12-16Check whether object is valid in allocation_info_tracer_compactPeter Zhu
When reference updating ObjectSpace.trace_object_allocations, we need to check whether the object is valid or not because it does not mark the object so the object may be dead. This can cause a segmentation fault if the object is on a free heap page. For example, the following script crashes: require "objspace" objs = [] ObjectSpace.trace_object_allocations do 1_000_000.times do objs << Object.new end end objs = nil # Free pages that the objs were on GC.start # Run compaction and check that it doesn't crash GC.compact Notes: Merged: https://github.com/ruby/ruby/pull/12360
2024-12-16[ruby/prism] [Bug #20785] Allow `, and` and `, or` after patternsydah
Partially: https://bugs.ruby-lang.org/issues/20785 https://github.com/ruby/prism/commit/71c9102d02 Notes: Merged: https://github.com/ruby/ruby/pull/12358
2024-12-16[ruby/prism] Ignore newlines in labelled lambda argumentsHaldun Bayhantopcu
https://github.com/ruby/prism/commit/4ce6bcf182 Notes: Merged: https://github.com/ruby/ruby/pull/12358
2024-12-16[ruby/prism] Fix 3112 - disallow commas after block argeileencodes
Prism was already disallowing arguments after block args, but in parse.y, any comma after a block arg is a syntax error. This moves the error handling into `PM_TOKEN_UAMPERSAND` where we can check if the current type is `PM_TOKEN_COMMA`then raise an error. I've also updated the tests to include the examplesfrom ruby/prism#3112. Fixes: ruby/prism#3112 https://github.com/ruby/prism/commit/754cf8eddc Notes: Merged: https://github.com/ruby/ruby/pull/12358
2024-12-16[ruby/prism] Fix up regression in ruby parser translationKevin Newton
https://github.com/ruby/prism/commit/b283a72c88 Notes: Merged: https://github.com/ruby/ruby/pull/12358
2024-12-16Fix ObjectSpace.trace_object_allocations for compactionPeter Zhu
We need to reinsert into the ST table when an object moves because it is a numtable that hashes on the object address, so when an object moves we need to reinsert it rather than just updating the key. Notes: Merged: https://github.com/ruby/ruby/pull/12339
2024-12-16[ruby/prism] Blocks & kwargs are not valid in index assignmentsMatt Valentine-House
Ruby feature: https://bugs.ruby-lang.org/issues/20952 https://github.com/ruby/prism/commit/e612df5f36
2024-12-16[ruby/rdoc] Fix to parse `rb_define_global_const`Nobuyoshi Nakada
https://github.com/ruby/ruby/pull/12357 https://github.com/ruby/rdoc/commit/458ecbb7f7
2024-12-16[ruby/reline] Change quoted_insert and bracketed_paste to a singletomoya ishida
key input (https://github.com/ruby/reline/pull/792) https://github.com/ruby/reline/commit/8f331edb07
2024-12-16Freeze `Random::Formatter::ALPHANUMERIC` and its elementsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12356
2024-12-16[ruby/rdoc] Add attribute :force to RDoc::RubygemsHook just liketomoya ishida
RDoc::RubyGemsHook (https://github.com/ruby/rdoc/pull/1244) Rubygems creates an instance of RDoc::RubygemsHook, sets `doc.force = overwrite`, then calls `doc.generate` the document. RDoc::RubygemsHook needs attribute `:force` just like RDoc::RubyGemsHook. https://github.com/ruby/rdoc/commit/01bdbcdd4d
2024-12-16[ruby/tmpdir] Fix for path-like objectsNobuyoshi Nakada
Fix https://github.com/ruby/tmpdir/pull/37 https://github.com/ruby/tmpdir/commit/a8ceafae7d
2024-12-16[ruby/securerandom] Restore SecureRandom.alphanumeric same as ↵Hiroshi SHIBATA
Random::Formatter.alphanumeric of Ruby 3.3/3.4 Fixes https://github.com/ruby/securerandom/pull/35 https://github.com/ruby/securerandom/commit/fbb36e36cc
2024-12-16[ruby/fiddle] ffi_backend: convert numeric function args to pointersDani Smith
(https://github.com/ruby/fiddle/pull/162) This allows for passing integers as pointer arguments to functions when using the FFI backend. This is a workaround until we can get JRuby's FFI implementation to allow for it directly (see also https://github.com/jruby/jruby/pull/8423) --------- https://github.com/ruby/fiddle/commit/e2f0952e9b Co-authored-by: Benoit Daloze <[email protected]>
2024-12-15[ruby/reline] Refactor Reline::Unicode ed_ vi_ em_ methodstomoya ishida
(https://github.com/ruby/reline/pull/720) * Refactor Reline::Unicode vi_ ed_ em_ methods * Make Reline::Unicode's vi_ ed_ em_ method encoding safe https://github.com/ruby/reline/commit/cdd7288978