summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2024-10-17[ruby/win32-registry] Fix compatibility with JRubyLars Kanis
JRuby's fiddle implementation has quite some shortcomings compared with the CRuby impl. Add JRuby tests in CI. https://github.com/ruby/win32-registry/commit/7f34184c2e
2024-10-17[ruby/win32-registry] Move all tests to volatile environment and use ↵Lars Kanis
per-test individual registry key This allows to run all tests in parallel. Usage of `File` methods is avoided. Since all tests are executed in the volatile environment of the registry, the dedicated 'create_volatile' test is removed now. Also add some documentation to the test setup. Downside of this use of the "Volatile Environment" is that we can not use or test the `create` method with default options. This is because within this path only keys with option `REG_OPTION_VOLATILE` are allowed. https://github.com/ruby/win32-registry/commit/3c186ae7dd
2024-10-16Fix memory leak in syntax error in prismPeter Zhu
If there is a syntax error, there could be an ast_node in the result. This could get leaked if there is a syntax error so parsing could not complete (parsed is not set to true). For example, the following script leaks memory: 10.times do 10_000.times do eval("def foo(...) super(...) {}; end") rescue SyntaxError end puts `ps -o rss= -p #{$$}` end Before: 31328 42768 53856 65120 76208 86768 97856 109120 120208 131296 After: 20944 20944 20944 20944 20944 20944 20944 20944 20944 20944 Notes: Merged: https://github.com/ruby/ruby/pull/11901
2024-10-16RubyVM::InstructionSequence.of Thread::Backtrace::LocationKevin Newton
This would be useful for debugging. Notes: Merged: https://github.com/ruby/ruby/pull/11896
2024-10-16[ruby/prism] RelocationKevin Newton
https://github.com/ruby/prism/commit/5ea6042408
2024-10-16Skip GC compaction tests in test_yjit.rb when not supportedPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/11905
2024-10-16[ruby/yaml] Make YAML::DBM optionalHiroshi SHIBATA
https://github.com/ruby/yaml/commit/f7c44d3fd7
2024-10-16[ruby/yaml] Also use safe_load with each_value, values and shiftHiroshi SHIBATA
https://github.com/ruby/yaml/commit/f47d6123eb
2024-10-16[ruby/yaml] Added basic test casesHiroshi SHIBATA
https://github.com/ruby/yaml/commit/36a339c0d7
2024-10-16[ruby/json] Embedded helper.rb into test_helper.rbHiroshi SHIBATA
https://github.com/ruby/json/commit/f8417ffc69
2024-10-16[ruby/json] Fixed load path for ext versionHiroshi SHIBATA
https://github.com/ruby/json/commit/c17823688e
2024-10-16Restore missing test-case from ↵Hiroshi SHIBATA
https://github.com/ruby/json/commit/c5a6d8042752dca312cfb407a6d3e594458d1cd6 Co-authored-by: "Jean Boussier" <byroot@ruby-lang.org>
2024-10-16[ruby/json] ractor_test.rb: ignore stderrJean Boussier
When rubygems is double loaded it fails the test. The warning should happen in the first place but this makes the test more resilient. https://github.com/ruby/json/commit/513ddeaeb1
2024-10-16Use JRuby implementation for TruffleRuby (#149)Sutou Kouhei
Fix GH-145 Rename `lib/fiddle/jruby.rb` to `lib/fiddle/ffi_backend.rb` as a generic ffi gem API based implementation. JRuby and TruffleRuby use `lib/fiddle/ffi_backend.rb`. --------- Co-authored-by: Benoit Daloze <eregontp@gmail.com>
2024-10-16[ruby/fiddle] Ractor supportNobuyoshi Nakada
(https://github.com/ruby/fiddle/pull/139) https://github.com/ruby/fiddle/commit/91d0ea9849 Co-authored-by: Sutou Kouhei <kou@clear-code.com>
2024-10-15[ruby/rdoc] Generate meta tags based on page's contentVinicius Stock
(https://github.com/ruby/rdoc/pull/1091) https://github.com/ruby/rdoc/commit/716bc16a7d
2024-10-15Remove a puts in test_finalizer_thread_raisePeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/11883
2024-10-14[rubygems/rubygems] Fix `gem contents` for default gemsDavid Rodríguez
A default gem does not always live in the same place. For example, Bundler may be installed to `site_dir` when RubyGems have been upgraded. A more reliable way seems to actually activate the default gem, so that we can know for sure where it lives. https://github.com/rubygems/rubygems/commit/c69f6dfb18
2024-10-14[rubygems/rubygems] Fix duplicated specs when they have been previously ↵David Rodríguez
activated https://github.com/rubygems/rubygems/commit/b44bf2ac74
2024-10-14[Bug #20797] Check seconds in UTC offset as well as minutesNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/11892
2024-10-13[ruby/reline] Support continuous tab completiontomoya ishida
(https://github.com/ruby/reline/pull/761) Continuous tab completion is possible in GNU Readline. If dig_perfect_match_proc is set, continuous tab completion will be disabled. https://github.com/ruby/reline/commit/469a52846b
2024-10-13[ruby/irb] Fix rendering test broken by conflicttomoya ishida
(https://github.com/ruby/irb/pull/1016) https://github.com/ruby/irb/commit/a21b953a99
2024-10-12[DOC] Fix spellingJohn Bampton
Notes: Merged: https://github.com/ruby/ruby/pull/11884 Merged-By: nobu <nobu@ruby-lang.org>
2024-10-12[ruby/irb] Make rendering test faster using updated yamatanoorotitomoya ishida
(https://github.com/ruby/irb/pull/1001) https://github.com/ruby/irb/commit/2c2956bc1f
2024-10-11[ruby/prism] Prism::StringQueryKevin Newton
Introduce StringQuery to provide methods to access some metadata about the Ruby lexer. https://github.com/ruby/prism/commit/d3f55b67b9
2024-10-11Rename supports_auto_compact? to supports_compact?Peter Zhu
It's testing whether GC compaction is supported in general. Notes: Merged: https://github.com/ruby/ruby/pull/11885
2024-10-11Used respond_to? check for compaction in test_gc_compact.rbPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/11885
2024-10-11[ruby/irb] History refactors (https://github.com/ruby/irb/pull/1013)Gert Goet
* Extract logic save_history in separate helper * Extract logic history_file in helper * Allow for readonly history https://github.com/ruby/irb/commit/52307f9026
2024-10-11Remove defined check for GC.config in test_gc.rbPeter Zhu
GC.config is always defined. Notes: Merged: https://github.com/ruby/ruby/pull/11867
2024-10-11[rubygems/rubygems] Check that the binstub was actually resetDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d46fca6126
2024-10-10[rubygems/rubygems] Only pristine executables for default gemsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/1cfc1d626c
2024-10-10[ruby/prism] Prism::CodeUnitsCacheKevin Newton
Calculating code unit offsets for a source can be very expensive, especially when the source is large. This commit introduces a new class that wraps the source and desired encoding into a cache that reuses pre-computed offsets. It performs quite a bit better. There are still some problems with this approach, namely character boundaries and the fact that the cache is unbounded, but both of these may be addressed in subsequent commits. https://github.com/ruby/prism/commit/2e3e1a4d4d
2024-10-10Fix typo in test_gc.rb [ci skip]Peter Zhu
2024-10-10[ruby/prism] Do not warn for unused variables on negative linesKevin Newton
Fixes [Bug #20788] https://github.com/ruby/prism/commit/27e91f21af
2024-10-10[rubygems/rubygems] Fix `gem pristine etc` resetting gem twice sometimesDavid Rodríguez
If a default version and a regular version of etc are present at the same time, RubyGems will end up duplicating work and running pristine twice. The `etc` gem is special because it's loaded by RubyGems by default. When doing this, RubyGems will activate the regularly installed version. The when `gem pristine` runs, it will find to installed specifications but materialize both to the already activated specification. Before: ``` $ gem pristine etc --version 1.4.3 Restoring gems to pristine condition... Building native extensions. This could take a while... Restored etc-1.4.3 Building native extensions. This could take a while... Restored etc-1.4.3 ``` After: ``` $ gem pristine etc --version 1.4.3 Restoring gems to pristine condition... Skipped etc-1.4.3, it is a default gem Building native extensions. This could take a while... Restored etc-1.4.3 ``` https://github.com/rubygems/rubygems/commit/5c279ac56b
2024-10-10[rubygems/rubygems] Improve some indentationsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/30f228a97f
2024-10-10[rubygems/rubygems] Run specs that now pass on JRubyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/2af077ee38
2024-10-10[ruby/prism] Reject invalid splat as last statement of parenthesesKevin Newton
https://github.com/ruby/prism/commit/3a0b1c6110
2024-10-10[ruby/fiddle] Only print Fiddle::VERSION when flag is trueHiroshi SHIBATA
(https://github.com/ruby/fiddle/pull/151) The test of current HEAD revision occurred `unknown command` on `ruby/ruby` repo. ``` $ make test-all -j TESTS="fiddle -j12" MSPECOPT="-j" (snip) # Running tests: unknown command: "Fiddle::VERSION: 1.1.3.dev"8681=test_fiddle 58682=test_pack 58683=test_handle 58684=test_import 58685=test_c_union_entity 58686:waiting 58687=test_pinne unknown command: "Fiddle::VERSION: 1.1.3.dev"8681=test_fiddle 58682=test_pack 58683=test_handle 58684=test_import 58685=test_c_union_entity 58686=test_cparser 58687=test_ unknown command: "Fiddle::VERSION: 1.1.3.dev"8681=test_fiddle 58682=test_pack 58683=test_handle 58684=test_import 58685=test_c_union_entity 58686=test_cparser 58687=test_ unknown command: "Fiddle::VERSION: 1.1.3.dev"8681=test_fiddle 58682=test_memory_view 58683=test_handle 58684=test_import 58685=test_c_union_entity 58686=test_cparser 5868 unknown command: "Fiddle::VERSION: 1.1.3.dev"8681=test_closure 58682=test_memory_view 58683=test_handle 58684=test_import 58685=test_c_union_entity 58686=test_cparser 586 unknown command: "Fiddle::VERSION: 1.1.3.dev" unknown command: "Fiddle::VERSION: 1.1.3.dev" unknown command: "Fiddle::VERSION: 1.1.3.dev"8681=test_closure 58682=test_memory_view 58683=test_handle 58684=test_import 58685=test_c_struct_builder 58686=test_cparser 5 unknown command: "Fiddle::VERSION: 1.1.3.dev"8681=test_closure 58682=test_memory_view 58683=test_handle 58684=test_import 58685=test_c_struct_builder 58686=test_cparser 5 unknown command: "Fiddle::VERSION: 1.1.3.dev"8681=test_closure 58682=test_memory_view 58683=test_handle 58684=test_import 58685=test_c_struct_builder 58686=test_cparser 5 Finished tests in 1.136194s, 194.5090 tests/s, 929.4187 assertions/s. 221 tests, 1056 assertions, 0 failures, 0 errors, 4 skips ``` I only show fiddle version in this repository with `$VERSBOSE` flag. https://github.com/ruby/fiddle/commit/31bebd85be
2024-10-10Revert "Commented out to print fiddle version"Hiroshi SHIBATA
This reverts commit a1db8dbe166d82d7238b3d375344799e057dab2b.
2024-10-10test/resolv/test_dns.rb: Keep `UDPSocket`s until a free port is foundYusuke Endoh
Follow up to 589f1978d8c368b8eccf34453463ad46a58d36da I suspect `UDPSocket.new` grabs the same port number because they are closed at each trial. Notes: Merged: https://github.com/ruby/ruby/pull/11863
2024-10-10Revert "TestProcess#test_daemon_noclose is only working with macOS 15.1 ↵Yuta Saito
beta, we should skip with macOS 15.0" This reverts commit 3830bca5edd6964131971866c80107c89fac5362. Notes: Merged: https://github.com/ruby/ruby/pull/11849
2024-10-10Suppress warnings with `RUBYPOT=-w`Nobuyoshi Nakada
``` -:3: warning: assigned but unused variable - var -:3: warning: assigned but unused variable - var -:3: warning: assigned but unused variable - var -:3: warning: assigned but unused variable - var -:3: warning: assigned but unused variable - var -:3: warning: assigned but unused variable - var ```
2024-10-10Commented out to print fiddle versionHiroshi SHIBATA
2024-10-10Emit warning for other method redefinition typesThomas Marshall
This commit ensures warnings about `object_id` and `__send__` method redefinitions are emitted for other method types such as aliases, procs, and attr readers—anything except C functions.
2024-10-10Make test_hash_symbol_colon_key pass on LANG=en_USYusuke Endoh
It failed on a platform with LANG=en_US ``` 1) Failure: PPTestModule::PPSingleLineTest#test_hash_symbol_colon_key [/home/chkbuild/chkbuild/tmp/build/20241010T010005Z/ruby/test/test_pp.rb:207]: <"{a: 1, a!: 1, a?: 1, \u3042: 1}"> expected but was <"{a: 1, a!: 1, a?: 1, \"\\u3042\": 1}">. ``` Notes: Merged: https://github.com/ruby/ruby/pull/11862
2024-10-10[ruby/fiddle] test jruby: fix a typoSutou Kouhei
https://github.com/ruby/fiddle/commit/d76c87b804 Notes: Merged: https://github.com/ruby/ruby/pull/11860
2024-10-10[ruby/fiddle] test jruby: fix a wrong messageSutou Kouhei
https://github.com/ruby/fiddle/commit/00b3521f5e Notes: Merged: https://github.com/ruby/ruby/pull/11860
2024-10-10[ruby/fiddle] test jruby: fix a typoSutou Kouhei
https://github.com/ruby/fiddle/commit/5bc55e0533 Notes: Merged: https://github.com/ruby/ruby/pull/11860
2024-10-10Import JRuby implementation (#147)Sutou Kouhei
Fix GH-104 lib/fiddle/jruby.rb is based on https://github.com/jruby/jruby/blob/master/lib/ruby/stdlib/fiddle/jruby.rb . Here are changes for it: * Move `Fiddle::TYPE_*` to `Fiddle::Types::*` * Add `Fiddle::Types::VARIADIC` * Add `Fiddle::Types::CONST_STRING` * Add `Fiddle::Types::BOOL` * Add `Fiddle::Types::INT8_T` * Add `Fiddle::Types::UINT8_T` * Add `Fiddle::Types::INT16_T` * Add `Fiddle::Types::UINT16_T` * Add `Fiddle::Types::INT32_T` * Add `Fiddle::Types::UINT32_T` * Add `Fiddle::Types::INT64_T` * Add `Fiddle::Types::UINT64_T` * Add more `Fiddle::ALIGN_*` for the above new `Fiddle::Types::*` * Add more `Fiddle::SIZEOF_*` for the above new `Fiddle::Types::*` * Add support for specifying type as not only `Fiddle::Types::*` but also `Symbol` like `:int` * Add support for variable size arguments in `Fiddle::Function` * Add `Fiddle::Closure#free` * Add `Fiddle::Closure#freed?` * Add `Fiddle::Error` as base the error class * Add `Fiddle::Pointer#call_free` and stop using `FFI::AutoPointer` in `Fiddle::Pointer` * Add support for `Fiddle::Pointer.malloc {}` `Fiddle::Pointer` * Add support for `Fiddle::Pointer#free=` * Add `Fiddle::Pointer#freed?` * Use binary string not C string for `Fiddle::Pointer#[]` * Add `Fiddle::Handle.sym_defined?` * Add `Fiddle::Handle#sym_defined?` * Add `Fiddle::Handle::DEFAULT` * Add `Fiddle::ClearedReferenceError` * Add no-op `Fiddle::Pinned` Some features are still "not implemented". So there are some "omit"s for JRuby in tests. Notes: Merged: https://github.com/ruby/ruby/pull/11860