summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2025-01-31[Feature #19521] Test for `Module#set_temporary_name`Nobuyoshi Nakada
2025-01-30Output object_id in ObjectSpace.dumpPeter Zhu
Outputs the object ID in the dump for objects that have it seen. Notes: Merged: https://github.com/ruby/ruby/pull/12657
2025-01-31rb_alias: improve "undefined method" error message by invokingFabio Sangiovanni
`rb_print_undef` with `target_klass` as argument. Notes: Merged: https://github.com/ruby/ruby/pull/12665
2025-01-29[ruby/openssl] pkey: avoid calling i2d_PUBKEY family on an incomplete keyKazuki Yamaguchi
Call ossl_pkey_check_public_key() to ensure that EVP_PKEY_missing_parameters() passes. This check should be cheap. DSA#{to_der,to_pem,export,to_s} and PKey#{public_to_der,public_to_pem} cause a segfault if the receiver is an empty DSA instance with no parameters set. Fixes <https://github.com/ruby/openssl/issues/845>. https://github.com/ruby/openssl/commit/5aeed935e5
2025-01-29[ruby/openssl] test/openssl/test_ossl.rb: use clock_gettime for measuring timeKazuki Yamaguchi
The benchmark library is planned to become a bundled gem in Ruby 3.5. While we can add it in our Gemfile, it is only used in test_memcmp_timing and the usage can be easily replaced with a few Process.clock_gettime calls. https://github.com/ruby/openssl/commit/9a746ed1a4
2025-01-29[ruby/error_highlight] Ensure first_line and last_line are setYusuke Endoh
Fixes https://github.com/ruby/error_highlight/pull/58 https://github.com/ruby/error_highlight/commit/9ddc1f31a9
2025-01-28Allow JSON::Fragment to be used even in strict modeJean Boussier
2025-01-28Introduce JSON::CoderÉtienne Barrié
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2025-01-28[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.107 to 0.9.108 - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.107...v0.9.108) Updates `rb-sys` from 0.9.107 to 0.9.108 - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.107...v0.9.108) --- 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] <support@github.com> https://github.com/rubygems/rubygems/commit/9f5bc8abfa
2025-01-24Fix "Relax expectations of errors from `getgrnam`"Nobuyoshi Nakada
Use `assert_raise_kind_of` instead of `assert_raise`, that rejects sub classes of the given exceptions. Notes: Merged: https://github.com/ruby/ruby/pull/12626
2025-01-24Migrate irb and reline to the bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12624
2025-01-22[ruby/prism] Fix rescue modifier precedenceKevin Newton
Fixes [Bug #21048] https://github.com/ruby/prism/commit/07202005cb
2025-01-23[ruby/openssl] pkey: change PKey::{RSA,DSA,DH}#params to use nil for missing ↵Kazuki Yamaguchi
parameters The returned Hash from these methods contain 0 in place of a missing parameter in the key, for example: pkey = OpenSSL::PKey.read(OpenSSL::PKey::RSA.new(2048).public_to_pem) pp pkey.params #=> # {"n"=>#<OpenSSL::BN https://github.com/ruby/openssl/commit/286934673421[...snip]>, # "e"=>#<OpenSSL::BN 65537>, # "d"=>#<OpenSSL::BN 0>, # "p"=>#<OpenSSL::BN 0>, # "q"=>#<OpenSSL::BN 0>, # "dmp1"=>#<OpenSSL::BN 0>, # "dmq1"=>#<OpenSSL::BN 0>, # "iqmp"=>#<OpenSSL::BN 0>} Let's use nil instead, which is more appropriate for indicating a missing value. https://github.com/ruby/openssl/commit/f247ec3dec
2025-01-23[ruby/openssl] pkey: add tests for PKey::{RSA,DSA,DH}#paramsKazuki Yamaguchi
Add missing test cases to verify the current behavior. The next patch will rewrite those methods. https://github.com/ruby/openssl/commit/c0e0669f9b
2025-01-22[ruby/openssl] ssl: fix SSLSocket#sysread leaking locktmp String on timeoutKazuki Yamaguchi
Commit https://github.com/ruby/openssl/commit/3bbf5178a90e made blocking methods on SSLSocket follow the IO#timeout= value. The commit changed io_wait_readable() to potentially raise an exception without unlocking the String. The String is currently locked for the entire duration of a #sysread method call. This does not seem to be necessary, as SSL_read() does not require that the same buffer is specified when retrying. Locking the String during each SSL_read() call should be sufficient. https://github.com/ruby/openssl/commit/8f791d73f5
2025-01-22[ruby/irb] Use EnvUtil.rubybin instead of "ruby" in copy commandtomoya ishida
test (https://github.com/ruby/irb/pull/1071) `ruby` is not always available. https://github.com/ruby/irb/commit/f6c5106364
2025-01-22[ruby/irb] Fix pager preview with escape sequence and newlinestomoya ishida
(https://github.com/ruby/irb/pull/1069) https://github.com/ruby/irb/commit/a139562a07 Notes: Merged: https://github.com/ruby/ruby/pull/12612
2025-01-22[ruby/irb] Show a quick preview of inspect result before pagertomoya ishida
launch (https://github.com/ruby/irb/pull/1040) * Quickly show inspect preview even if pretty_print takes too much time * Show a message "Inspecting..." while generating pretty_print content * Update inspecting message Co-authored-by: Stan Lo <stan001212@gmail.com> * Update rendering test for preparing inspect message * Don't show preview if pretty_print does not take time --------- https://github.com/ruby/irb/commit/03c36586e6 Co-authored-by: Stan Lo <stan001212@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/12612
2025-01-22[ruby/irb] Add copy command (https://github.com/ruby/irb/pull/1044)Prajjwal Singh
Closes https://github.com/ruby/irb/pull/753 https://github.com/ruby/irb/commit/a24ac53d48 Notes: Merged: https://github.com/ruby/ruby/pull/12612
2025-01-22Relax expectations of errors from `getgrnam`Nobuyoshi Nakada
The list of errors cited in 58bc97628c14933b73f13e0856d1a56e70e8b0e4 is not exhaustive and other errors may be raised by `getgrnam`. Additionally, these errors are system dependent and may not be listed on all platforms. Notes: Merged: https://github.com/ruby/ruby/pull/12610
2025-01-21[ruby/openssl] Require OpenSSL 1.1.1 or laterKazuki Yamaguchi
Drop support for OpenSSL 1.1.0. OpenSSL 1.1.0 was a non-LTS release and it has reached upstream EOL in 2019-12 along with OpenSSL 1.0.2. Distributions that shipped with OpenSSL 1.1.0 include: - Debian 9 (EOL 2022-06) - Ubuntu 18.04 LTS (EOL 2023-04) https://github.com/ruby/openssl/commit/ba83abe920
2025-01-21[ruby/openssl] pkey/dh: do not skip test_params_ok? on LibreSSLKazuki Yamaguchi
https://github.com/ruby/openssl/commit/cd91cef590
2025-01-21[ruby/mmtk] Bump mmtk-corePeter Zhu
Fixes a bug where there is an infinite loop when MMTK_HEAP_MIN is small. https://github.com/ruby/mmtk/commit/12c7ede20b
2025-01-21[ruby/mmtk] Add tests for MMTK_HEAP_MINPeter Zhu
https://github.com/ruby/mmtk/commit/a725b95f51
2025-01-20[ruby/openssl] Require OpenSSL 1.1.0 or laterKazuki Yamaguchi
Drop support for OpenSSL 1.0.2. It has reached upstream EOL in 2019-12. Most distributions that shipped with OpenSSL 1.0.2 have also reached EOL, or provide a newer version in the package repository: - RHEL 7 (EOL 2024-06) - Ubuntu 16.04 LTS (EOL 2021-04) - Amazon Linux 2 (EOL 2026-06, but OpenSSL 1.1.1 can be installed via the openssl11{,-devel} package) https://github.com/ruby/openssl/commit/38ec6fd50e
2025-01-20[ruby/json] Reject invalid number: `-` `-.1` `-e0`tompng
https://github.com/ruby/json/commit/b9bfeecfa9 Notes: Merged: https://github.com/ruby/ruby/pull/12602
2025-01-20[ruby/json] Raise parse error on invalid commentstompng
https://github.com/ruby/json/commit/2f57f40467 Notes: Merged: https://github.com/ruby/ruby/pull/12602
2025-01-20[ruby/json] Fix parsing incomplete unicode escape "\uaaa"tompng
https://github.com/ruby/json/commit/86c0d4eb7e Notes: Merged: https://github.com/ruby/ruby/pull/12602
2025-01-20[ruby/json] Introduce JSON::FragmentÉtienne Barrié
https://github.com/ruby/json/commit/9e3500f345 Co-authored-by: Jean Boussier <jean.boussier@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/12602
2025-01-20[ruby/json] Fix a regression in the parser with leading /Jean Boussier
Ref: https://github.com/ruby/ruby/pull/12598 This could lead to an infinite loop. https://github.com/ruby/json/commit/f8cfa2696a Notes: Merged: https://github.com/ruby/ruby/pull/12600
2025-01-20Finalize Kevin's handrolled parser.Jean Boussier
And get rid of the Ragel parser. This is 7% faster on activitypub, 15% after on twitter and 11% faster on citm_catalog. There might be some more optimization opportunities, I did a quick optimization pass to fix a regression in string parsing, but other than that I haven't dug much in performance. Notes: Merged: https://github.com/ruby/ruby/pull/12598
2025-01-17[ruby/mmtk] Add mmtk_heap_max to GC.configPeter Zhu
https://github.com/ruby/mmtk/commit/6a78ffaf16
2025-01-16[ruby/mmtk] Add mmtk_heap_min to GC.configPeter Zhu
https://github.com/ruby/mmtk/commit/5bbac70c69
2025-01-16[ruby/mmtk] Add NoGC back to MMTK_PLAN testPeter Zhu
https://github.com/ruby/mmtk/commit/89f8b8be04
2025-01-16[ruby/mmtk] Add mmtk_heap_mode to GC.configPeter Zhu
https://github.com/ruby/mmtk/commit/810f897603
2025-01-16[rubygems/rubygems] fix `@licenses` array unmarshallingMichael Rykov
https://github.com/rubygems/rubygems/commit/12f3e78c95
2025-01-16Disabled to existence test for win32oleHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12583
2025-01-16Migrate win32ole as bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12583
2025-01-16[ruby/json] Refactor JSONFixturesTestJean Boussier
https://github.com/ruby/json/commit/c69963fbe5
2025-01-15[ruby/mmtk] Add mmtk_plan to GC.configPeter Zhu
https://github.com/ruby/mmtk/commit/67da9ea5b8
2025-01-15[ruby/irb] Colorize backref token bold green like global variablestomoya ishida
(https://github.com/ruby/irb/pull/1065) https://github.com/ruby/irb/commit/0b60a5be1d
2025-01-15[ruby/prism] Mark some parser translator tests as being known failuresEarlopain
Without a change from `parser`, this is impossible to correctly handle. https://github.com/ruby/prism/commit/ca1d44e808
2025-01-15Fix ENV tests on Windows on ARM64Lars Kanis
Due to the x64 emulation of Windows 11 on ARM the environment variable PROCESSOR_ARCHITECTURE is set by the process startup code. It must therefore be excluded from tests. Otherwise tests fail like so: ``` [30585/32394] TestProcess#test_execopts_unsetenv_others = 0.10 s 16) Failure: TestProcess#test_execopts_unsetenv_others [C:/Users/Lars/ruby/test/ruby/test_process.rb:446]: <""> expected but was <"PROCESSOR_ARCHITECTURE=ARM64\n">. [30616/32394] TestProcess#test_execopts_env = 0.16 s 17) Failure: TestProcess#test_execopts_env [C:/Users/Lars/ruby/test/ruby/test_process.rb:326]: <"PATH\n"> expected but was <"PATH\n" + "PROCESSOR_ARCHITECTURE\n">. ``` Notes: Merged: https://github.com/ruby/ruby/pull/12581
2025-01-15Skip related tests with Gem::RDocHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12577
2025-01-15Migrate rdoc as bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12577
2025-01-14[PRISM] Handle forwarding inside evalKevin Newton
Fixes [Bug #21031] Notes: Merged: https://github.com/ruby/ruby/pull/12575
2025-01-14[ruby/mmtk] Add mmtk_worker_count to GC.configPeter Zhu
https://github.com/ruby/mmtk/commit/836a9059cb
2025-01-14Better handle regexp in the parser translatorEarlopain
Turns out, it was already almost correct. If you disregard \c and \M style escapes, only a single character is allowed to be escaped in a regex so most tests passed already. There was also a mistake where the wrong value was constructed for the ast, this is now fixed. One test fails because of this, but I'm fairly sure it is because of a parser bug. For `/\“/`, the backslash is supposed to be removed because it is a multibyte character. But tbh, I don't entirely understand all the rules. Fixes more than half of the remaining ast differences for rubocop tests
2025-01-14[ruby/prism] Support forwarding flags on scopesKevin Newton
When parent scopes around an eval are forwarding parameters (like *, **, &, or ...) we need to know that information when we are in the parser. As such, we need to support passing that information into the scopes option. In order to do this, unfortunately we need a bunch of changes. The scopes option was previously an array of array of strings. These corresponded to the names of the locals in the parent scopes. We still support this, but now additionally support passing in a Prism::Scope instance at each index in the array. This Prism::Scope class holds both the names of the locals as well as an array of forwarding parameter names (symbols corresponding to the forwarding parameters). There is convenience function on the Prism module that creates a Prism::Scope object using Prism.scope. In JavaScript, we now additionally support an object much the same as the Ruby side. In Java, we now have a ParsingOptions.Scope class that holds that information. In the dump APIs, these objects in all 3 languages will add an additional byte for the forwarding flags in the middle of the scopes serialization. All of this is in service of properly parsing the following code: ```ruby def foo(*) = eval("bar(*)") ``` https://github.com/ruby/prism/commit/21abb6b7c4
2025-01-14[ruby/mmtk] Exit with error message if MMTK_PLAN is invalidPeter Zhu
https://github.com/ruby/mmtk/commit/79ce2008a3