summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2024-12-10[ruby/reline] Fix line wrapped cursor positiontomoya ishida
(https://github.com/ruby/reline/pull/791) Cursor position calculation was wrong when the input line contains "\1" or CSI escape sequence. https://github.com/ruby/reline/commit/a1943daaf4
2024-12-10[ruby/fiddle] Fix test_dlopen_linker_script_input_linux beingDani Smith
omitted on Fedora 40 aarch64 (https://github.com/ruby/fiddle/pull/161) I found working on Fedora 40 on aarch64 that `test_dlopen_linker_script_input_linux` was omitted due to not finding libncurses.so, since it is in /usr/lib64. This PR makes the glob a little more portable. https://github.com/ruby/fiddle/commit/444774c0c4
2024-12-09[ruby/rdoc] Expand rdoc-ref targets at the end of ri outputStan Lo
(https://github.com/ruby/rdoc/pull/1141) There have been several document refactors in ruby/ruby that extract individual methods/classes' documentation into separate files, like ruby/ruby#6567 Because RI is not capable of rendering those references, RI users are left with dramatically fewer documentation on those methods/classes. This commit adds a new option `--expand-ref` (default: true) to expand all the rdoc-ref targets at the end of the output. https://github.com/ruby/rdoc/commit/9e2b28c6e3
2024-12-08[ruby/rdoc] Use distinct styles for note lists and label listsnicholas a. evans
(https://github.com/ruby/rdoc/pull/1209) * Use the original `label` description list style As a default for all description lists, the original "label" style is more readable. This is slightly different from the original `label` dl though: * slightly increased left margin for `dd` (to 1em) * removed right margin on `dd` * removed `dt` bottom margin and `dd` top margin, to reduce the gap between the term and its description (to only the standard line-height gap). * Add closing tags for description list terms Without the closing tags, the dt elements contain whitespace after the text. This normally isn't a big deal, but does mess some things up, e.g: using `::after` with `content: ", "` in stylesheets. * Restore float:left style for note lists Unlike the original note list styles, this version sets the line-height for all `dt` elements to be the same as the `p` elements contained inside the `dd`, so that the second line has the same indentation as all subsequent lines. * Add commas between note list terms https://github.com/ruby/rdoc/commit/9e69ea6d75
2024-12-07[ruby/openssl] ssl: do not clear existing SSL options in SSLContext#set_paramsKazuki Yamaguchi
Apply SSL options set in DEFAULT_PARAMS without clearing existing options. It currently clears options in order to avoid setting one of the options included in OpenSSL::SSL::OP_ALL unless explicitly specified, namely OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS. Now that OpenSSL::SSL::OP_ALL has been removed from SSLContext#initialize, it is no longer necessary. https://github.com/ruby/openssl/commit/77c3db2d65
2024-12-07[ruby/openssl] ssl: do not enable OpenSSL::SSL::OP_ALL by defaultKazuki Yamaguchi
Respect the SSL options set by default by SSL_CTX() and by the system-wide OpenSSL configuration file. OpenSSL::SSL::SSLContext#initialize currently adds OpenSSL::SSL::OP_ALL on top of the default SSL options. Let's stop doing it. OpenSSL::SSL::OP_ALL is a set of options that changes OpenSSL's behavior to workaround various TLS implementation bugs. Using it is considered usually safe, but is not completely harmless. https://github.com/ruby/openssl/commit/00bec0d905
2024-12-07[ruby/openssl] make configs shareable when frozenHoneyryderChuck
https://github.com/ruby/openssl/commit/654cb22e21
2024-12-07[ruby/openssl] make config frozen on initializeHoneyryderChuck
https://github.com/ruby/openssl/commit/50599513cf
2024-12-07[ruby/openssl] ssl: handle callback exceptions in SSLSocket#sysread and ↵Kazuki Yamaguchi
#syswrite Check the ID_callback_state ivar after SSL_read() or SSL_write() returns, similar to what ossl_start_ssl() does. Previously, callbacks that can raise a Ruby exception were only called from ossl_start_ssl(). This has changed in OpenSSL 1.1.1. Particularly, the session_new_cb will be called whenever a client receives a NewSessionTicket message, which can happen at any time during a TLS 1.3 connection. https://github.com/ruby/openssl/commit/aac9ce1304
2024-12-06[rubygems/rubygems] Skip unresolved deps warning on ↵David Rodríguez
`Gem::Specification.reset` on benign cases If `Gem::Specification.reset` is used, but there are still unresolved dependencies, RubyGems prints a warning. There are though, certain cases where the situation will not cause any issues. One such case is when the unresolved dependency does not restrict any versions (>= 0) and there's a default gem matching it. In this situation, it doesn't matter if Gem paths change, because default gems are still activatable, so the dependency will be properly activated if ever needed. https://github.com/rubygems/rubygems/commit/e5f8a3068e
2024-12-06[rubygems/rubygems] Make sure unresolved deps are properly cleared by ↵David Rodríguez
`Gem::Specification.reset` https://github.com/rubygems/rubygems/commit/3976326a7b
2024-12-06[Bug #20929] Win32: Encode timezone name in UTF-8Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12269
2024-12-06[Bug #20929] Fix `assert_zone_encoding`Nobuyoshi Nakada
The default internal encoding is not taken into account to encode timezone name. Notes: Merged: https://github.com/ruby/ruby/pull/12269
2024-12-06[ruby/reline] Combine MAPPINGS(single byte input to symbol) withtomoya ishida
key_bindings(escape sequence to symbol) (https://github.com/ruby/reline/pull/715) https://github.com/ruby/reline/commit/6a7e249374
2024-12-05[ruby/mmtk] Add MMTk test exclusions for Ruby CIMatt Valentine-House
https://github.com/ruby/mmtk/commit/f62e5803f1
2024-12-05[ruby/prism] Fix error messages for unterminated ( and {Aaron Patterson
If we hit an EOF token, and the character before the EOF is a newline, we should make EOF token start at the previous newline. That way any errors reported will occur on that line. For example "foo(\n" should report an error on line 1 even though the EOF technically occurs on line 2. [Bug #20918] https://bugs.ruby-lang.org/issues/20918 https://github.com/ruby/prism/commit/60bc43de8e
2024-12-05Standardize on the name "modular GC"Peter Zhu
We have name fragmentation for this feature, including "shared GC", "modular GC", and "external GC". This commit standardizes the feature name to "modular GC" and the implementation to "GC library". Notes: Merged: https://github.com/ruby/ruby/pull/12261
2024-12-05[ruby/rdoc] Workaround JRuby's jar-dependencies error and testStan Lo
failures on CI (https://github.com/ruby/rdoc/pull/1225) * Workaround JRuby's jar-dependencies error on CI * Skip problematic encoding test for JRuby https://github.com/ruby/rdoc/commit/3f9897d64c
2024-12-05[ruby/rdoc] Deprecate `main` and `title` directivesStan Lo
(https://github.com/ruby/rdoc/pull/1218) * Deprecate :main: directive * Deprecate :title: direcive * Update documentation * Remove :main: directive's usage * Update test cases * Add '.rdoc_options' to suggested alternatives https://github.com/ruby/rdoc/commit/e2d4ac9dad
2024-12-05[ruby/json] Fix generate(script_safe: true) to not confuse unrelated charactersJean Boussier
Fix: https://github.com/ruby/json/issues/715 The first byte check was missing. https://github.com/ruby/json/commit/93a7f8717d Notes: Merged: https://github.com/ruby/ruby/pull/12267
2024-12-04[ruby/shellwords] NUL char cannot be in shell wordsNobuyoshi Nakada
https://github.com/ruby/shellwords/commit/2c7ae1b76c
2024-12-04[ruby/logger] Enable log file rotation on WindowsNobuyoshi Nakada
Since ruby 2.3, a file opened with `File::SHARE_DELETE` and `File::BINARY` can be renamed or removed. https://github.com/ruby/logger/commit/7b6146fee6
2024-12-03[ruby/irb] Don't show 'Maybe IRB bug!' in show_source and ls commandtomoya ishida
(https://github.com/ruby/irb/pull/1039) https://github.com/ruby/irb/commit/9eb14a3a0b
2024-12-03[ruby/timeout] updated testsCosmicOppai
https://github.com/ruby/timeout/commit/c6d121aa18
2024-12-03[ruby/timeout] refactor the change to raise for nil and type-errror and ↵CosmicOppai
added tests https://github.com/ruby/timeout/commit/ffc8d7c003
2024-12-03[ruby/timeout] refactor the change to keep the compatability with nil and ↵CosmicOppai
type-errror and added tests https://github.com/ruby/timeout/commit/e8a7dbdb87
2024-12-03[ruby/timeout] refactor the change to keep the compatability with nil and ↵CosmicOppai
type-errror and added tests https://github.com/ruby/timeout/commit/8342544979
2024-12-03Reapply "[ruby/rdoc] fix: C variables should never show up in Ancestors tree"Hiroshi SHIBATA
This reverts commit 0fe82ae087130d7f360cc0607be93995cedbdb16. Notes: Merged: https://github.com/ruby/ruby/pull/12233
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-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-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-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 <[email protected]>
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-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] 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/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-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-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-02[ruby/set] Fix ^ to respect subclassesKouhei Yanagita
https://github.com/ruby/set/commit/f88ecdef6b
2024-11-30[ruby/reline] Call user defined sigwinch and sigcont handlertomoya ishida
(https://github.com/ruby/reline/pull/788) https://github.com/ruby/reline/commit/7d44770c84
2024-11-30[ruby/rdoc] Methods are sorted symbols-firstMike Dalessio
(https://github.com/ruby/rdoc/pull/1219) There are three distinct ranges of symbols in ASCII: - the range below "A", 0..64 in decimal - the range between "Z" and "a", 91..96 in decimal - the range above "z", 123..127 in decimal With this change, any method starting with a character in these "symbol ranges" will be sorted before a method starting with an alpha ASCII character. The remaining methods, all starting with alpha or 8-bit characters, will be sorted against each other exactly as before. Specifically this addresses the issue from #1204 which is that `#[]` and `#^` were previously sorted _after_ the alpha methods. These methods will now be sorted before alpha methods. Fixes https://github.com/ruby/rdoc/pull/1204 https://github.com/ruby/rdoc/commit/a4f13d242b
2024-11-30[ruby/reline] Fix tests failing when INPUTRC is definedPascal Terjan
(https://github.com/ruby/reline/pull/789) Failure: test_empty_xdg_config_home(Reline::Config::Test) /home/pterjan/reline/test/reline/test_config.rb:563:in `test_empty_xdg_config_home' 560: expected = File.expand_path('~/.config/readline/inputrc') 561: FileUtils.mkdir_p(File.dirname(expected)) 562: FileUtils.touch(expected) => 563: assert_equal expected, @config.inputrc_path 564: ensure 565: FileUtils.rm(expected) 566: ENV['XDG_CONFIG_HOME'] = xdg_config_home_backup <"/tmp/test_reline_config_4131165/.config/readline/inputrc"> expected but was <"/etc/inputrc"> https://github.com/ruby/reline/commit/7de5a50f63
2024-11-30[ruby/rdoc] fix: C variables should never show up in Ancestors treeMike Dalessio
(https://github.com/ruby/rdoc/pull/1217) If a NormalClass's superclass is a C enclosure, then update the superclass to point to the RDoc::NormalClass. This is done in a single pass after all files have been parsed. Fixes https://github.com/ruby/rdoc/pull/1205. https://github.com/ruby/rdoc/commit/1ecd9581b1
2024-11-29Warn when redefining __id__ as well as object_idJohn Hawthorn
[Feature #20912] Notes: Merged: https://github.com/ruby/ruby/pull/12177
2024-11-29[Bug #20915] Fix SEGV with `TracePoint#parameters` and aliased C methodviralpraxis
The following snippet results with a SEGV: ```ruby C = Class.new do alias_method :new_to_s, :to_s end TracePoint.new(:c_call, &:parameters).enable { C.new.new_to_s } ``` at MRI 3.3.6 and ruby 3.4.0dev The root cause of the issue lies in the `rb_tracearg_parameters` function within the `RUBY_EVENT_C_RETURN` branch. Specifically, when the invoked method is an alias for a C function, `rb_method_entry_without_refinements(..., trace_arg->called_id, ...)` may return NULL. In that case we can fallback to `trace_arg->id`. Notes: Merged: https://github.com/ruby/ruby/pull/12186