summaryrefslogtreecommitdiff
path: root/test/ruby/test_rubyoptions.rb
AgeCommit message (Collapse)Author
2024-03-12Use `assert_crash_report` in `test_crash_report_pipe`Nobuyoshi Nakada
Instead of using `assert_in_out_err` directly.
2024-02-28Fix crash report path test on WindowsNobuyoshi Nakada
2024-02-28Fix to use `assert_crash_report` resultsNobuyoshi Nakada
2024-02-22Cover all warning category optionsNobuyoshi Nakada
2024-02-21Re-enable test now that dump is all ASCIIKevin Newton
2024-02-21skip a test on non-UTF-8 localeKoichi Sasada
`ruby --parser=prism -W:no-experimental --dump=parsetree -e :hi` prints non-ASCII char(s) so the following test with non UTF-8 locale fails. ``` $ LANG=C make test-all TESTS='-n /parser/ ruby/rubyoptions' -o encs -o exts Run options: --seed=32323 "--ruby=./miniruby -I/home/ko1/ruby/src/master/lib -I. -I.ext/common /home/ko1/ruby/src/master/tool/runruby.rb --extout=.ext -- --disable-gems" --excludes-dir=/home/ko1/ruby/src/master/test/.excludes --name=!/memory_leak/ -n /parser/ [1/1] TestRubyOptions#test_parser_flag = 0.04 s 1) Failure: TestRubyOptions#test_parser_flag [/home/ko1/ruby/src/master/test/ruby/test_rubyoptions.rb:300]: pid 135869 exit 0. 1. [1/2] Assertion for "stdout" | invalid byte sequence in US-ASCII. Finished tests in 0.044362s, 22.5416 tests/s, 225.4157 assertions/s. 1 tests, 10 assertions, 1 failures, 0 errors, 0 skips ruby -v: ruby 3.4.0dev (2024-02-20T17:13:36Z master c0e5de9567) [x86_64-linux] make: *** [uncommon.mk:945: yes-test-all] Error 1 ``` Now simply skip the test if the locale is not UTF-8. (I'm not familiar with encodings so please fix it if needed)
2024-02-20Update warning flags before dumpNobuyoshi Nakada
2024-02-16[PRISM] Make prism compiler warning experimentalKevin Newton
2024-02-15Do not include a backtick in error messages and backtracesYusuke Endoh
[Feature #16495]
2024-01-29Fix test/ruby/test_rubyoptions.rb + --parser=prismKevin Newton
2024-01-25Simplified test case for encoding optionHiroshi SHIBATA
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2024-01-17Fix off-by-one error of argcNobuyoshi Nakada
Fix ruby/ruby#9562
2024-01-09Introduce NODE_SYM to manage symbol literalyui-knk
`:sym` was managed by `NODE_LIT` with `Symbol` object. This commit introduces `NODE_SYM` so that 1. Symbol literal is detectable from AST Node 2. Reduce dependency on ruby object
2024-01-02Introduce NODE_FILEyui-knk
`__FILE__` was managed by `NODE_STR` with `String` object. This commit introduces `NODE_FILE` and `struct rb_parser_string` so that 1. `__FILE__` is detectable from AST Node 2. Reduce dependency ruby object
2024-01-02Add a test case for `__LINE__` assignment in condition warningyui-knk
2023-12-20Correct free_on_exit env var to free_at_exitHParker
2023-12-15Update error message in test_rubyoptionsKevin Newton
2023-12-15Introduce --parser runtime flagHParker
Introduce runtime flag for specifying the parser, ``` ruby --parser=prism ``` also update the description: ``` $ ruby --parser=prism --version ruby 3.3.0dev (2023-12-08T04:47:14Z add-parser-runtime.. 0616384c9f) +PRISM [x86_64-darwin23] ``` [Bug #20044]
2023-12-07Free everything at shutdownAdam Hess
when the RUBY_FREE_ON_SHUTDOWN environment variable is set, manually free memory at shutdown. Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2023-10-17"+MN" in descriptionKoichi Sasada
If `RUBY_MN_THREADS=1` is given, this patch shows `+MN` in `RUBY_DESCRIPTION` like: ``` $ RUBY_MN_THREADS=1 ./miniruby --yjit -v ruby 3.3.0dev (2023-10-17T04:10:14Z master 908f8fffa2) +YJIT +MN [x86_64-linux] ``` Before this patch, a warning is displayed if `$VERBOSE` is given. However it can make troubles with tests (with `$VERBOSE`), do not show any warning with a MN threads configuration.
2023-09-29Fix to replace only `-e` that is a path name in `assert_crash_report`Nobuyoshi Nakada
2023-09-28Syntax check of `yield` in the parserNobuyoshi Nakada
2023-09-28Jumps are possible in the top-level loopNobuyoshi Nakada
2023-09-28Suppress void context warnings in verbose modeNobuyoshi Nakada
2023-09-28Suppress void context warningsNobuyoshi Nakada
2023-09-27Out of place jumps are valid in `defined?`Nobuyoshi Nakada
2023-09-27Syntax check of `retry` in the parserNobuyoshi Nakada
2023-09-27Fix error token locationNobuyoshi Nakada
2023-09-27Syntax check of block exits in the parserNobuyoshi Nakada
2023-09-26Run crash report test processes without `RUBY_ON_BUG`Nobuyoshi Nakada
These processes are to be crashed, avoid running debugger.
2023-09-26Run crash report test processes without `RUBY_ON_BUG`Nobuyoshi Nakada
These processes are to be crashed, avoid running debugger.
2023-09-25[Feature #19790] Rename BUGREPORT_PATH as CRASH_REPORTNobuyoshi Nakada
2023-09-25Invoke the command when RUBY_BUGREPORT_PATH starts with `|`Nobuyoshi Nakada
2023-09-25Redirect to RUBY_BUGREPORT_PATH fileNobuyoshi Nakada
2023-09-18[Bug #19887] RUBYOPT should work without leading `-`Nobuyoshi Nakada
2023-09-18Simplify restoring ENVNobuyoshi Nakada
2023-08-28Remove --disable-gems in assert_in_out_errPeter Zhu
assert_in_out_err adds --disable=gems so we don't need to add --disable-gems in the args list. Notes: Merged: https://github.com/ruby/ruby/pull/8303
2023-08-13Fix the precedence of `--backtrace-limit` optionNobuyoshi Nakada
In general, if the same option specifying a single value is given multiple times at the same level, the last one overrides the earlier ones, unless prohibited. Notes: Merged: https://github.com/ruby/ruby/pull/8212
2023-08-11Fix range of `--backtrace-limit`Nobuyoshi Nakada
Also an option command line should have precedence over `RUBYOPT`. Notes: Merged: https://github.com/ruby/ruby/pull/8200
2023-08-02Allow to override environment variables for debugNobuyoshi Nakada
2023-07-16Allow -1 as the value of `--backtrace-limit` optionTom Stuart
-1 is a legitimate backtrace limit — in fact, it’s the default — so it should be possible to provide it with the `--backtrace-limit` option.
2023-07-16Test that command line `--backtrace-limit` overrides RUBYOPTNobuyoshi Nakada
Co-authored-by: Tom Stuart <hi@tomstu.art>
2023-04-13Emit a performance warning when a class reached max variationsJean Boussier
[Feature #19538] This new `peformance` warning category is disabled by default. It needs to be specifically enabled via `-W:performance` or `Warning[:performance] = true` Notes: Merged: https://github.com/ruby/ruby/pull/7708
2023-04-03Avoid failing test_enable on warningsTakashi Kokubun
This fails on RubyCI due to RJIT warnings too often. It should be enough to test RJIT feature in test_rjit_version. We only want warnings instead of test failures when there are warnings, at least for this case.
2023-03-16Add thread and ractor counts to bug reportsAlan Wu
This is useful for crash triaging. It also helps to hint extension developers about the misuse of `rb_thread_call_without_gvl()`. Example: $ ./miniruby -e 'Ractor.new{Ractor.receive}; Thread.new{sleep}; Process.kill:SEGV,Process.pid' <snip> -- Threading information --------------------------------------------------- Total ractor count: 2 Ruby thread count for this ractor: 2 Notes: Merged: https://github.com/ruby/ruby/pull/7532
2023-03-11Move yjit_force_enabled? to JITSupportTakashi Kokubun
for consistency
2023-03-11Remove unused methods from JITSupportTakashi Kokubun
2023-03-10RJIT: Break up and enable test_version (#7495)Takashi Kokubun
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2023-03-06s/mjit/rjit/Takashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/7462
2023-03-06s/MJIT/RJIT/Takashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/7462