summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-07-04ObjectSpace.dump: Include string coderangeJean Boussier
I suspect that some shared pages are invalidated because some static string don't have their coderange set eagerly. So the first time they are scanned, the entire memory page is invalidated. Being able to see the coderange in `ObjectSpace` would help debug this. And in addition `dump` currently call `is_broken_string()` and `is_ascii_string()` which both end up scanning the string and assigning coderange. I think it's undesirable as `dump` should be read only. Notes: Merged: https://github.com/ruby/ruby/pull/6076
2022-07-01[ruby/stringio] Fix the result of `StringIO#truncate` so compatible with `File`Nobuyoshi Nakada
https://github.com/ruby/stringio/commit/16847fea32
2022-06-30[rubygems/rubygems] Prevent a warning: `*' interpreted as argument prefixYusuke Endoh
http://rubyci.s3.amazonaws.com/ubuntu2004-arm/ruby-master/log/20220630T063003Z.log.html.gz ``` [19606/21662] TestAst#test_not_cared:test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb(none):18: warning: `*' interpreted as argument prefix (none):19: warning: `*' interpreted as argument prefix = 0.00 s ``` https://github.com/rubygems/rubygems/commit/c98f9326e8
2022-06-30[Bug #18877] Let `lex_ctxt` not to eat escaped whitespaceNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6065
2022-06-29Refactor tests for moving strings with compactionPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/6077
2022-06-29[Bug #18884] `class` cannot be just followed by modifiersNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6064 Merged-By: nobu <nobu@ruby-lang.org>
2022-06-29[rubygems/rubygems] Support ruby 2.3 and 2.4Ian Ker-Seymer
https://github.com/rubygems/rubygems/commit/3a9205df36
2022-06-29[rubygems/rubygems] Upgrade rb-sys to 0.9.14Ian Ker-Seymer
https://github.com/rubygems/rubygems/commit/c9adf3ef1c
2022-06-29[rubygems/rubygems] Add `gem env user_gemhome` and `gem env user_gemdir`David Rodríguez
https://github.com/rubygems/rubygems/commit/14d3f80df6
2022-06-29[rubygems/rubygems] Add missing test for user installation directoryDavid Rodríguez
https://github.com/rubygems/rubygems/commit/5ab8aa2a45
2022-06-29[ruby/irb] Properly reset USE_COLORIZE after changing it in testsst0012
Some context tests assigns USE_COLORIZE to false and never change it back. This can potentially affect other tests' result as the default should be nil (activated) instead. https://github.com/ruby/irb/commit/986eb16ece
2022-06-28[rubygems/rubygems] Fix test_install_location_extra_slash on alpineTomas Volf
Under POSIX behavior of leading // is implementation defined. Musl does preserve it in realpath, glibc does not. That means the test was failing when executed on alpine linux. Original issue #508 was about // in the path, not about leading ones. When executed in such environment, the test will still test what it should when the explicit mangling of the path is not done. Fixes #5652 https://github.com/rubygems/rubygems/commit/0fa7373bf6
2022-06-28[ruby/irb] Centralize coloring control (https://github.com/ruby/irb/pull/374)Stan Lo
* Use colorable: argument as the only coloring control * Centalize color controling logic at Color.colorable? There are 2 requirements for coloring output: 1. It's supported on the platform 2. The user wants it: `IRB.conf[:USE_COLORIZE] == true` Right now we check 1 and 2 separately whenever we colorize things. But it's error-prone because while 1 is the default of `colorable` parameter, 2 always need to manually checked. When 2 is overlooked, it causes issues like https://github.com/ruby/irb/pull/362 And there's 0 case where we may want to colorize even when the user disables it. So I think we should merge 2 into `Color.colorable?` so it can be automatically picked up. * Add tests for all inspect modes * Simplify inspectors' coloring logic * Replace use_colorize? with Color.colorable? * Remove Context#use_colorize cause it's redundant https://github.com/ruby/irb/commit/1c53023ac4
2022-06-28[ruby/rdoc] Support attributes defined by `rb_struct_define`Nobuyoshi Nakada
https://github.com/ruby/rdoc/commit/854b370763
2022-06-28[ruby/rdoc] Parse also InitVM-prefixed functionsNobuyoshi Nakada
Initialization depending on VM is separated. https://github.com/ruby/rdoc/commit/030d10fccd
2022-06-27[ruby/reline] Enable to change the background color of dialogs. ↵pocari
(https://github.com/ruby/reline/pull/413) https://github.com/ruby/reline/commit/bd49537964
2022-06-27[rubygems/rubygems] Improve error message when `operating_system.rb` fails ↵David Rodríguez
to load Show an absolute path instead of an unhelpful relative path. https://github.com/rubygems/rubygems/commit/f1eed36e2f
2022-06-26Skip TupleSpaceProxyTest on MINGW64 tooTakashi Kokubun
It wasn't specific to UCRT64 https://github.com/ruby/ruby/runs/7062992464
2022-06-26Fix Rinda test teardown for omitted testsAlan Wu
New test failures on MINGW appeared after c2e37c8ff7da395f33fae546d9ae9e2408fc9236. 1) Error: Rinda::TupleSpaceProxyTest#test_00_template: NoMethodError: undefined method `stop_service' for nil:NilClass D:/a/ruby/ruby/src/test/rinda/test_rinda.rb:516:in `teardown' 2) Error: Rinda::TupleSpaceProxyTest#test_ruby_talk_264062: NoMethodError: undefined method `stop_service' for nil:NilClass D:/a/ruby/ruby/src/test/rinda/test_rinda.rb:516:in `teardown' Teardown happens even when the test is omitted. See: https://github.com/ruby/ruby/runs/7058984522
2022-06-25Try skipping TupleSpaceProxyTest on MinGW UCRT64Takashi Kokubun
As you all know, MinGW UCRT64 CI has randomly got stuck despite its "Finished tests" output. Looking at the logs closely, it seems like all of the recent such reproductions end with the following output: ``` Retrying hung up testcases... [ 1/14] Rinda::TupleSpaceProxyTest#test_ruby_talk_264062 = 0.21 s [ 2/14] Rinda::TupleSpaceProxyTest#test_00_template = 0.01 s [ 3/14] Rinda::TupleSpaceProxyTest#test_inp_rdp = 0.00 s [ 4/14] Rinda::TupleSpaceProxyTest#test_core_03_notify = 0.01 s [ 5/14] Rinda::TupleSpaceProxyTest#test_00_renewer = 0.01 s [ 6/14] Rinda::TupleSpaceProxyTest#test_cancel_02 = 0.11 s [ 7/14] Rinda::TupleSpaceProxyTest#test_00_DRbObject = 0.00 s [ 8/14] Rinda::TupleSpaceProxyTest#test_core_02 = 0.11 s [ 9/14] Rinda::TupleSpaceProxyTest#test_core_01 = 0.11 s [10/14] Rinda::TupleSpaceProxyTest#test_remote_array_and_hash = 0.01 s [11/14] Rinda::TupleSpaceProxyTest#test_00_tuple = 0.00 s [12/14] Rinda::TupleSpaceProxyTest#test_take_bug_8215 = 0.41 s [13/14] Rinda::TupleSpaceProxyTest#test_cancel_01 = 0.11 s [14/14] Rinda::TupleSpaceProxyTest#test_symbol_tuple = 0.01 s Finished tests in 719.252845s, 29.4292 tests/s, 3838.7154 assertions/s. 21167 tests, 2761007 assertions, 0 failures, 0 errors, 708 skips ``` https://github.com/ruby/ruby/runs/7057789554 While it seems to be retried successfully, given that it hungs up once and this appears all the time, this test class seems a bit suspicious. To check if it's related, let me try disabling this for now.
2022-06-26[ruby/irb] Set prompt mode explictlyNobuyoshi Nakada
Fix https://github.com/ruby/irb/pull/353 https://github.com/ruby/irb/commit/7db93f9326
2022-06-26[ruby/irb] Require stringio to use StringIONobuyoshi Nakada
https://github.com/ruby/irb/commit/e024ab716b
2022-06-26[ruby/irb] Ensure stdout is a TTY before calling winsizePeter Jones
When outputting a (possibly truncated) value, IRB will query the window size. However, if IRB was piped to another process, stdout will no longer be a TTY and will not support the `winsize` method. This fix ensure that stdout is a TTY. https://github.com/ruby/irb/commit/125de5eeea
2022-06-26[rubygems/rubygems] Clean up temporary directory after generate_index --updateTomas Volf
While generate_index did clean up temporary directory, when running with --update flag, that did not happen and the temporary directory was left behind. This commit fixes that and modifies tests in order to make sure this is not reintroduced later on. Fixes #5635. https://github.com/rubygems/rubygems/commit/9fa34dc329
2022-06-25[ruby/io-wait] Fix usage of `assert_raises` -> `assert_raise`. ↵Samuel Williams
(https://github.com/ruby/io-wait/pull/20) https://github.com/ruby/io-wait/commit/c5c6abbb5c
2022-06-25* remove trailing spaces. [ci skip]git
2022-06-25[ruby/io-wait] Don't add `IO#wait*` methods when `RUBY_IO_WAIT_METHODS` is ↵Samuel Williams
defined by Ruby. (https://github.com/ruby/io-wait/pull/19) * Fix return value compatibility with Ruby 2.x. * Don't add `IO#wait*` methods in Ruby 3.2+. https://github.com/ruby/io-wait/commit/54c504d089
2022-06-24Sync RubyGems & Bundler with upstream repoDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/6054
2022-06-22Fix infinite loop when b_return TracePoint throwsAlan Wu
Previously, we didn't pop the frame that runs the TracePoint hook for b_return events for blocks running as methods (bmethods). In case the hook raises, that formed an infinite loop during stack unwinding in hook_before_rewind(). [Bug #18060] Notes: Merged: https://github.com/ruby/ruby/pull/4638
2022-06-20Include JIT information in crash reportsChris Seaton
Since enabling YJIT or MJIT drastically changes what could go wrong at runtime, it's good to be front and center about whether they are enabled when dumping a crash report. Previously, `RUBY_DESCRIPTION` and the description printed when crashing can be different when a JIT is on. Introduce a new internal data global, `rb_dynamic_description`, and set it to be the same as `RUBY_DESCRIPTION` during initialization; use it when crashing. * version.c: Init_ruby_description(): Initialize and use `rb_dynamic_description`. * error.c: Change crash reports to use `rb_dynamic_description`. * ruby.c: Call `Init_ruby_description()` earlier. Slightly more work for when we exit right after printing the description but that was deemed acceptable. * include/ruby/version.h: Talk about how JIT info is not in `ruby_description`. * test/-ext-/bug_reporter/test_bug_reporter.rb: Remove handling for crash description being different from `RUBY_DESCRIPTION`. * test/ruby/test_rubyoptions.rb: ditto Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Co-authored-by: Alan Wu <alanwu@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/5872
2022-06-20test_instrumentation_api.rb: Allow one less exitJean Boussier
I suspect that sometimes on CI the last thread is prempted before eaching the exit hook causing the test to flake. I can't find a good way to force it to run.
2022-06-20[Feature #18788] Support options as `String` to `Regexp.new`Nobuyoshi Nakada
`Regexp.new` now supports passing the regexp flags not only as an `Integer`, but also as a `String. Unknown flags raise errors. Notes: Merged: https://github.com/ruby/ruby/pull/6039
2022-06-20Warn suspicious flag to `Regexp.new`Nobuyoshi Nakada
Now second argument should be `true`, `false`, `nil` or Integer. This flag is confused with third argument some times. Notes: Merged: https://github.com/ruby/ruby/pull/6039
2022-06-20Prevent a warning "possibly useless use of a literal in void context"Yusuke Endoh
2022-06-20Prevent a warning "Expected ... to define AutoloadTest but it didn't"Yusuke Endoh
related: [Bugs #18813] and eca31d24d606a73def3674938112dc3c5b79c445
2022-06-19Scale the time to wait native threads to run hookNobuyoshi Nakada
2022-06-18[Bug #18813] Warn when autoload has to lookup in parent namespaceJean Boussier
This is a verbose mode only warning. Notes: Merged: https://github.com/ruby/ruby/pull/6038
2022-06-17Debug TestThreadInstrumentationJean Boussier
It previously failed with: ``` 1) Failure: TestThreadInstrumentation#test_thread_instrumentation_fork_safe [/home/runner/work/ruby/ruby/src/test/-ext-/thread/test_instrumentation_api.rb:50]: <5> expected but was <4>. ``` Suggesting one `EXIT` event wasn't fired or processed. Adding an assetion on `Thead#status` may help figure out what is wrong. Notes: Merged: https://github.com/ruby/ruby/pull/6032
2022-06-17GVL Instrumentation API: add STARTED and EXITED eventsJean Boussier
[Feature #18339] After experimenting with the initial version of the API I figured there is a need for an exit event to cleanup instrumentation data. e.g. if you record data in a {thread_id -> data} table, you need to free associated data when a thread goes away. Notes: Merged: https://github.com/ruby/ruby/pull/6029
2022-06-17Skip failing test on FreeBSD [ci skip]Nobuyoshi Nakada
2022-06-16Allow calling protected methods from refinementsJohn Hawthorn
Previously protected methods on refinements could never be called because they were seen as being "defined" on the hidden refinement ICLASS. This commit updates calling refined protected methods so that they are considered to be defined on the original class (the one being refined). This ended up using the same behaviour that was used to check whether a call to super was allowed, so I extracted that into a method. [Bug #18806] Notes: Merged: https://github.com/ruby/ruby/pull/5966
2022-06-17Respect the encoding of the source [Bug #18827]Nobuyoshi Nakada
Do not override the input string encoding at the time of preparation, the source encoding is not determined from the input yet. Notes: Merged: https://github.com/ruby/ruby/pull/6015
2022-06-17ENV.merge! support multile arguments [Feature #18279]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5207
2022-06-16Added tests for setting ivars on frozen objsJemma Issroff
Notes: Merged: https://github.com/ruby/ruby/pull/6021
2022-06-16Adding more clone tests, and adding dup testsJemma Issroff
Notes: Merged: https://github.com/ruby/ruby/pull/6021
2022-06-16[ruby/net-http] Make `Net::HTTPHeader#content_range` return nil on non-byte ↵Shishir Joshi
units * Returning nil from the `content_range` method instead of raising an error when the unit in the content-range header is not "bytes". Fix https://bugs.ruby-lang.org/issues/11450 https://github.com/ruby/net-http/commit/0b5030dd86 Co-Authored-By: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-06-16Revert "HTTPHeader.content_range throws error on non-byte units"Nobuyoshi Nakada
This reverts commit 63546bfc1581d4abec2a0d846106a1c0afc0efa9.
2022-06-16HTTPHeader.content_range throws error on non-byte unitsShishir Joshi
* Added a nil check in Net::HTTPHeader#initialize_http_header for keys in the header that do not have any value * Returning nil from the content_range method instead of raising an error when the unit in the content-range header is not bytes * Modified initialize_http_header to match trunk fix [Bug #11450] fix https://github.com/ruby/ruby/pull/1018 Notes: Merged-By: nurse <naruse@airemix.jp>
2022-06-15MJIT: Handle JIT failure properlyTakashi Kokubun
2022-06-15Remove MJIT worker thread (#6006)Takashi Kokubun
[Misc #18830] Notes: Merged-By: k0kubun <takashikkbn@gmail.com>