summaryrefslogtreecommitdiff
path: root/test/ruby/test_rubyoptions.rb
AgeCommit message (Collapse)Author
2025-12-26Clarify the intent of the test for "ruby -h" to fit in 80x25Yusuke Endoh
2025-12-24Revert "Add link to Ruby options doc in help text"NARUSE, Yui
This reverts commit 31ff07ed1eb05d01f7da3c017d542137a3db1e94. * Don't add a test which only runs on production release * https://github.com/ruby/actions/actions/runs/20486784889/job/58870959976 * Don't add a new line to `ruby --help` * https://github.com/ruby/ruby/pull/14142#issuecomment-3689829564
2025-12-24Revert "Extract `ruby_api_version_name`"NARUSE, Yui
This reverts commit 9b576cd6255aba97e5e2f55f4b09f00c7dd0e839.
2025-12-11Stop bumping RUBY_PATCHLEVEL in release versions (#15502)Takashi Kokubun
[[Misc #21770]](https://bugs.ruby-lang.org/issues/21770)
2025-11-23Don't use non blocking pipes for RUBY_CRASH_REPORTPeter Zhu
[Bug #21703] RUBY_CRASH_REPORT does not work in some cases when shelling out on Linux. For example, given the following shell script dump.sh: #!/usr/bin/env bash cat > /tmp/crash And we see it fails like this: $ RUBY_CRASH_REPORT="|dump.sh" ruby -rfiddle -e "Fiddle::Pointer.new(1, 10)[0]" cat: -: Resource temporarily unavailable
2025-10-14[Bug #21638] Mark ractor-local `$VERBOSE` and `$DEBUG`Nobuyoshi Nakada
https://github.com/sampersand/blog/blob/master/the%20-s%20flag.md#the-segfault
2025-10-07Verify that RubyGems is enabled by defaultNobuyoshi Nakada
2025-10-05Also add LSAN_OPTIONS=handle_segv=0 in assert_segvPeter Zhu
Just like ASAN, when running with LSAN, we also want to set handle_segv=0 in assert_segv to make sure that the tests pass.
2025-09-17Unset RUBY_CRASH_REPORT in tests that crash on purposeAlan Wu
2025-09-05ZJIT: Fix tests for ZJIT (#14460)Takashi Kokubun
2025-08-14Increase timeout for a flaky test (#14228)Takashi Kokubun
https://github.com/ruby/ruby/actions/runs/16974964229/job/48121382131
2025-08-14Extract `ruby_api_version_name`Nobuyoshi Nakada
2025-08-13Add link to Ruby options doc in help textPeter Zhu
Adds link to https://docs.ruby-lang.org/en/master/ruby/options_md.html in Ruby help text (-h and --help).
2025-07-16Suppress warnings for variablesNobuyoshi Nakada
2025-06-16Use `success` option to check if the process failedNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/13624
2025-06-16Suppress stderr output in `TestRubyOptions#assert_segv`Nobuyoshi Nakada
It is checked against the given `list`, do not print the same output twice. Notes: Merged: https://github.com/ruby/ruby/pull/13624
2025-06-16Use the message given to `TestRubyOptions#assert_segv`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/13624
2025-06-11Try to run ignored tests with macOS 15Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13581
2025-05-11namespace on readSatoshi Tagomori
2025-03-21Fix regexp when non-ruby thread received the signalNobuyoshi Nakada
A space is added only when the source path is found.
2025-03-19A comment for TestRubyOptions::ExpectedStderrList [ci skip]Nobuyoshi Nakada
2025-03-19Source path may or may not existNobuyoshi Nakada
2025-03-19Loosen SEGV message testingYusuke Endoh
Since `rb_bug` does not always take Ruby frame info during SEGV, the source file path may not be output. ``` 1) Failure: TestRubyOptions#test_crash_report_script [/tmp/ruby/src/trunk_gcc11/test/ruby/test_rubyoptions.rb:907]: Expected / bug\.rb:(?:1:)?\s\[BUG\]\sSegmentation\sfault.*\n /x to match "[BUG] Segmentation fault at 0x000003e900328766\n"+ ``` http://ci.rvm.jp/results/trunk_gcc11@ruby-sp2-noble-docker/5663880
2025-02-13[Feature #21116] Extract RJIT as a third-party gemNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12740
2025-01-12[Bug #21018] Fix for s390xNobuyoshi Nakada
2025-01-09[Bug #21018] Show invalid command line option more properlyNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12538
2024-12-25[Feature #20884] Define toplevel "Ruby" module with constantsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12451
2024-12-12[Feature #20884] Reserve "Ruby" toplevel nameNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12315
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-11-14Include the currently active GC in RUBY_DESCRIPTIONMatt Valentine-House
This will add +MOD_GC to the version string and Ruby description when Ruby is compiled with shared gc support. When shared GC support is compiled in and a GC module has been loaded using RUBY_GC_LIBRARY, the version string will include the name of the currently active GC as reported by the rb_gc_active_gc_name function in the form +MOD_GC[gc_name] [Feature #20794] Notes: Merged: https://github.com/ruby/ruby/pull/11872
2024-11-06macOS 15 is the stable version todayHiroshi SHIBATA
2024-11-06`Warning[:strict_unused_block]`Koichi Sasada
to show unused block warning strictly. ```ruby class C def f = nil end class D def f = yield end [C.new, D.new].each{|obj| obj.f{}} ``` In this case, `D#f` accepts a block. However `C#f` doesn't accept a block. There are some cases passing a block with `obj.f{}` where `obj` is `C` or `D`. To avoid warnings on such cases, "unused block warning" will be warned only if there is not same name which accepts a block. On the above example, `C.new.f{}` doesn't show any warnings because there is a same name `D#f` which accepts a block. We call this default behavior as "relax mode". `strict_unused_block` new warning category changes from "relax mode" to "strict mode", we don't check same name methods and `C.new.f{}` will be warned. [Feature #15554] Notes: Merged: https://github.com/ruby/ruby/pull/12005
2024-11-04Fix Dir.mktmpdir argumentNobuyoshi Nakada
The temporary directory is the second argument.
2024-10-21Show where mutated chilled strings were allocatedÉtienne Barrié
[Feature #20205] The warning now suggests running with --debug-frozen-string-literal: ``` test.rb:3: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) ``` When using --debug-frozen-string-literal, the location where the string was created is shown: ``` test.rb:3: warning: literal string will be frozen in the future test.rb:1: info: the string was created here ``` When resurrecting strings and debug mode is not enabled, the overhead is a simple FL_TEST_RAW. When mutating chilled strings and deprecation warnings are not enabled, the overhead is a simple warning category enabled check. Co-authored-by: Jean Boussier <byroot@ruby-lang.org> Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Co-authored-by: Jean Boussier <byroot@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/11893
2024-09-10Add predicates for platformsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/11583
2024-08-29[Bug #20704] Win32: Fix chdir to non-ASCII pathNobuyoshi Nakada
On Windows, `chdir` in compilers' runtime libraries uses the active code page, but command line arguments in ruby are always UTF-8, since commit:33ea2646b98adb49ae2e1781753bf22d33729ac0. Notes: Merged: https://github.com/ruby/ruby/pull/11493
2024-08-15[PRISM] test_syntax_check assertion updates for prismKevin Newton
Notes: Merged: https://github.com/ruby/ruby/pull/11386
2024-07-18[PRISM] Refactor parser support into its own moduleKevin Newton
Notes: Merged: https://github.com/ruby/ruby/pull/11201
2024-07-18Refactor RUBY_DESCRIPTION assertions in test_rubyoptionsKevin Newton
Notes: Merged: https://github.com/ruby/ruby/pull/11192
2024-07-12Pend some tests because these are not working with macOS 15 beta and Xcode ↵Hiroshi SHIBATA
16 beta
2024-06-24Fix `--debug-frozen-string-literal` to not apply ↵Jean Boussier
`--disable-frozen-string-literal` [Feature #20205] This was an undesired side effect. Now that this value is a triplet, we can't assume it's disabled by default.
2024-06-07Remove prism compiler warningKevin Newton
2024-05-28Stop marking chilled strings as frozenÉtienne Barrié
They were initially made frozen to avoid false positives for cases such as: str = str.dup if str.frozen? But this may cause bugs and is generally confusing for users. [Feature #20205] Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
2024-04-12[PRISM] Ensure no void warnings in rubyoptions testKevin Newton
2024-04-06[Feature #20329] Separate additional flags from main dump optionsNobuyoshi Nakada
Additional flags are comma separated list preceeded by `-` or `+`. Before: ```sh $ ruby --dump=insns+without_opt ``` After: ```sh $ ruby --dump=insns-opt,-optimize ``` At the same time, `parsetree_with_comment` is split to `parsetree` option and additional `comment` flag. Before: ```sh $ ruby --dump=parsetree_with_comment ``` After: ```sh $ ruby --dump=parsetree,+comment ``` Also flags can be separate `--dump`. ```sh $ ruby --dump=parsetree --dump=+comment --dump=+error_tolerant ``` Ineffective flags are ignored silently. ```sh $ ruby --dump=parsetree --dump=+comment --dump=+error_tolerant ```
2024-03-28Disable ASAN handle_segv in test_rubyoptions.rbKJ Tsanaktsidis
ASAN registers a sigsegv handler and causes extra output to be emitted that these tests are not expecting.
2024-03-14Ensure test suite is compatible with --frozen-string-literalJean Boussier
As preparation for https://bugs.ruby-lang.org/issues/20205 making sure the test suite is compatible with frozen string literals is making things easier.
2024-03-14[Feature #20293] Add `Warning.categories`Nobuyoshi Nakada
2024-03-14Chomp last punctuations from descriptions for `-h`Nobuyoshi Nakada
The following parts will not be shown for `-h` option. And not to reach 80 columns. Some terminal emulators (Windows command prompt at least) wrap the cursor to the next line when reaching the rightmost column, before exceeding.
2024-03-12Check what actually needs to be checkedTakashi Kokubun
RubyVM::YJIT is conditionally defined, depending on --enable-yjit. However, RubyVM::YJIT.enabled? is always defined as long as RubyVM::YJIT is defined, so it seems weird to check RubyVM::YJIT.enabled? instead of RubyVM::YJIT.