summaryrefslogtreecommitdiff
path: root/test/ruby/test_rubyoptions.rb
AgeCommit message (Collapse)Author
2019-07-09Restore support library for only test files.Hiroshi SHIBATA
2019-07-08Check indent of `end` against `else` if presentNobuyoshi Nakada
2019-07-07Enable indentation warning against `if` just after `else`Nobuyoshi Nakada
```ruby if false puts 'false' else if true puts 'true' end # -:5: warning: mismatched indentations at 'end' with 'if' at 3 end ``` [Feature #15990]
2019-07-02Adjust jit_support file path.Hiroshi SHIBATA
2019-06-04Include inspect value of object in FrozenError messagesJeremy Evans
FrozenError#receiver was added recently for getting the related object programmatically. However, there are cases where FrozenError is raised and not handled, and in those cases the resulting error messages lack detail, which makes debugging the error more difficult, especially in cases where the error is not easily reproducible. This includes the inspect value of the frozen object in FrozenError messages, which should make debugging simpler.
2019-05-26test/lib/envutil.rb (EnvUtil.timeout): added.Yusuke Endoh
It is a wrapper for Timeout.timeout with the scale factor applied.
2019-05-26test/ruby/test_rubyoptions.rb (test_script_from_stdin): scale timeoutYusuke Endoh
for Solaris. https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10s/ruby-master/log/20190525T131909Z.fail.html.gz
2019-04-18Suppress warningsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-31exp is String, so it's always truthykazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-30ruby.c: respect features by command linenobu
* ruby.c (process_options): feature options in command line arguments take precedence over options in RUBYOPT environment variable. [ruby-core:92052] [Bug #15738] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-13Consider END blocknobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-13Fix rb_bug message pattern listnobu
"Other runtime information" section depends on platforms. Make no expectation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-13Fix rb_bug message pattern listnobu
Each setions are separated by an empty line, and C level backtrace information format has been changed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-13fix test for r67061naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-08Defer escaping control char in error messagesnobu
* eval_error.c (print_errinfo): defer escaping control char in error messages until writing to stderr, instead of quoting at building the message. [ruby-core:90853] [Bug #15497] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-26parse.y: remove "shadowing outer local variable" warningmame
You can now write the following without warning. user = User.all.find {|user| cond(user) } Fixes [Feature #12490]. A patch from Soutaro Matsumoto <matsumoto@soutaro.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-26Revert "parse.y: remove "shadowing outer local variable" warning"mame
I forgot to add the copyright of the patch... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-26parse.y: remove "shadowing outer local variable" warningmame
You can now write the following without warning. user = User.all.find {|user| cond(user) } Fixes [Feature #12490]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-22revisit more MJIT test skipsk0kubun
r65308 passed both trunk-mjit and trunk-mjit-wait CIs. MJIT copy job looks working fine. Then this commit skips 5 more tests. Some of them were skipped in a very early stage and may still need to be skipped, but I want to confirm them since they haven't been changed for a long time. And this prefers having inline information on `RubyVM::MJIT.enabled?`. This commit makes it easier to confirm whether there's suspicious test skip by RubyVM::MJIT.enabled? or not. After this commit, tentatively we're not skipping tests for MJIT other than `assert_no_memory_leak` ones. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20skip tests if --disable-mjit-support.ko1
* test/ruby/test_rubyoptions.rb: skip MJIT related test if an interpreter is built with --disable-mjit-support. * test/ruby/test_rubyvm_mjit.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-19test/lib/jit_support.rb: continue to skip test_jitk0kubun
for icc since it's not supported yet but running on rubyci. This reverts some part of r65175, r65176 and r65177. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-19test_rubyoptions.rb: don't use obsoleted methodk0kubun
It was removed on r65175. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-02Just a shebang is valid codenobu
[ruby-core:89240] [Bug #15190] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11Use https instead of httpkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-27ruby.c: taint ARGV on Windowsnobu
* ruby.c (external_str_new_cstr): strings come from the external should be tainted. [ruby-dev:50596] [Bug #14941] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-22test_rubyoptions.rb: allow passing test_verbosek0kubun
with --jit. `./ruby --jit -Itest/lib test/ruby/test_rubyoptions.rb -n "TestRubyOptions#test_verbose"` has failed without -DMJIT_FORCE_ENABLE like: 1) Failure: TestRubyOptions#test_verbose [/home/travis/build/k0kubun/mjit-test/test/ruby/test_rubyoptions.rb:118]: <"ruby 2.6.0dev (2018-07-21 trunk 64010) +JIT [x86_64-linux]"> expected but was <"ruby 2.6.0dev (2018-07-21 trunk 64010) [x86_64-linux]">. but the test should pass even without -DMJIT_FORCE_ENABLE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-18test_rubyoptions.rb: skip testing JIT on mswink0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-18ruby.c: accept --disable-jit optionk0kubun
by promoting jit to feature flag. mjit.h: update comment about mjit_opts.on test_rubyoptions.rb: add test for switching JIT enablement "--jit" flag usage may be deprecated later, but not discussed yet. [Feature #14878] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-16ruby.c: disable DidYouMean as gemnobu
* ruby.c (process_options): as DidYouMean requires Rubygems, disable the former when the latter is disabled too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-05unrevert r63852 but keep SIGCHLD path disabled for win32normal
Reading win32/win32.c waitpid implementation, maybe waitpid(-1, ...) on that platform will never conflict with mjit use of waitpid. In any case, I've added WAITPID_USE_SIGCHLD macro to vm_core.h so it can be easy for Linux/BSD users to test (hopefully!) win32-compatible code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-04Revert r63758 and related commitsnaruse
The change is unstable on Windows. Please re-commit it when it correctly supports Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-30fix r63799 ("test/ruby/test_rubyoptions.rb: improve diagnostics for failures")normal
CI machines are faster than mine :x git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-30test/ruby/test_rubyoptions.rb: improve diagnostics for failuresnormal
rubyci.org OSX CI instances seem to hang on this, but I'm not sure why... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-31fix the conditionnobu
* test/ruby/test_rubyoptions.rb: Process.wait with WNOHANG returns nil while the target process is alive. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-31test_rubyoptions.rb: relax timeoutnobu
* test/ruby/test_rubyoptions.rb: wait for setting process title until the child process dies, in the case of extra heavy loads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-29fake.rb: fix RUBY_DESCRIPTION for MJITnobu
* template/fake.rb.in: reflect MJIT to RUBY_DESCRIPTION. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-24test_rubyoptions.rb: RbConfig::CONFIG['cppflags'] can be nilk0kubun
not '' at least on AppVeyor git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-24test_rubyoptions.rb: allow passing test_verbosek0kubun
with -DMJIT_FORCE_ENABLE. With -DMJIT_FORCE_ENABLE, absence of --jit doesn't mean JIT disabled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-09Use `&.` instead of modifier ifkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-28test_rubyoptions.rb: let all tests work with --jitk0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-28test_bug_reporter.rb: make it work with --jitk0kubun
test_rubyoptions.rb: replace gsub with sub because it's suboptimal for this git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-28test_rubyoptions.rb: let test_verbose work w/ --jitk0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-13file.c: chardev is loadablenobu
* file.c (ruby_is_fd_loadable): allow character devices to load, e.g., `ruby /dev/null` exits successfully. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-12parse.y: `when` indentnobu
* parse.y (k_when): warn less-indented `when` than `case`. [ruby-core:86492] [Bug #14674] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-12assert indents of `case` and `end`nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-19parse.y: mismatched indentations at middlenobu
* parse.y (k_rescue, k_ensure, k_when, k_else, k_elsif): warn mismatched indentations at keywords in middle of blocks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-01parse.y: refine assign_in_cond warningnobu
* parse.y (assign_in_cond): refine a warning message for assignment of a literal in conditinal expression. [ruby-core:85872] [Bug #14562] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22test/ruby/test_rubyoptions.rb: fix typo and only expect +JIT for CRubyeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22test_rubyoptions.rb: don't test --jit if not supportedk0kubun
test/lib/jit_support.rb: carved out JITSupport test/ruby/test_jit.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22version.c: show +JIT when --jit is passedk0kubun
in version output. version.h: ditto ruby.c: propagate option for it common.mk: updated dependency for version.c mjit.c: overwrites the RUBY_DESCRIPTION to have +JIT when --jit is passed test/ruby/test_rubyoptions.rb: add test for them Only `ruby --jit -v` will have "+JIT", but this is intentional. This may not be convenient for debugging by ticket with `ruby -v`, but it's convenient for benchmark tools that pass options (--jit) when showing it. At least such behavior is planned for benchmark_driver.gem and this behavior is designed for it. Other benchmark tools are recommended to follow the behavior too if they show version. RUBY_DESCRIPTION might be useful for it too. The position of "+JIT" is changed from original proposal because other platforms like JRuby and TruffleRuby end it with archtecture. It's made similar to JRuby, but it's upper-cased because Matz made approval for "+JIT" in the ticket. Example: $ ruby -v ruby 2.6.0dev (2018-02-22 trunk 62529) [x86_64-linux] $ ruby --jit -v ruby 2.6.0dev (2018-02-22 trunk 62529) +JIT [x86_64-linux] After --jit is made default in the future, this output may be removed. So do not rely on this output if possible. [Feature #14462] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e