ruby/test
Koichi Sasada 29e01c6f5f skip if `DidYouMean.formatter=` is not defined
ruby/test_default_gems.rb can define empty `DidYouMean` module
because of the following line (second require) in the
`lib/did_you_mean/did_you_mean.gemspec`:

```ruby
begin
  require_relative "lib/did_you_mean/version"
rescue LoadError # Fallback to load version file in ruby core repository
  require_relative "version"
end
```

It defines only `::DidYouMean::VERSION`.

However, in the `test/ruby/test_patten_matching.rb` assumes that
if `defined?(DidYouMean)` is true, then there is a method `DidYouMean.formatter=`
and this assumption fails all tests in `test/ruby/test_patten_matching.rb` if
there is only a `::DidYouMean::VERSION`.

To reproduce the failures, we need to repeat the following command:

`make test-all TESTS='-v ruby/test_default_gems.rb ruby/pattern_matching'`

(because the ruby/test_default_gems.rb should be run before the ruby/pattern_matching`)

This patch introduces more strict gurds.
2023-04-16 09:26:56 +09:00
..
-ext- [Feature #19579] Remove !USE_RVARGC code (#7655) 2023-04-04 17:30:06 -04:00
base64
benchmark
bigdecimal [ruby/bigdecimal] Handle correctly #remainder with infinity. Fixes 2023-02-17 17:46:27 +00:00
cgi [ruby/cgi] Loosen the domain regex to accept '.' 2022-11-28 04:34:11 +00:00
coverage More coverage tests & specs. (#7171) 2023-01-22 13:49:13 +13:00
csv s/MJIT/RJIT/ 2023-03-06 23:44:01 -08:00
date [ruby/date] Implement Date#deconstruct_keys and DateTime#deconstruct_keys 2022-12-13 19:52:06 +00:00
did_you_mean [ruby/did_you_mean] Support the new message format of NameError in 2023-02-19 07:10:47 +00:00
digest
drb s/MJIT/RJIT/ 2023-03-06 23:44:01 -08:00
dtrace
erb [ruby/erb] Fix line numbers after multi-line <%# 2022-11-29 04:56:03 +00:00
error_highlight [ruby/error_highlight] Support the new message format of NameError in Ruby 3.3 2023-02-19 10:29:56 +00:00
etc
excludes A file was missing in test/excludes for TestArraySubclass 2023-02-28 11:04:32 +09:00
fiber Support `IO#pread` / `IO#pwrite` using fiber scheduler. (#7594) 2023-03-31 00:48:55 +13:00
fiddle Merge fiddle-1.1.1 2022-12-09 16:36:22 +09:00
fileutils [ruby/fileutils] Add mkdir_p to FileUtils.install 2023-02-10 03:37:39 +00:00
fixtures/fake_sorted_set_gem
io Remove `require 'io/wait'` where it's no longer necessary. (#6932) 2022-12-15 11:37:01 +13:00
irb [ruby/irb] Fix RubyLex's heredoc_with_hembexpr test to avoid ripper 2023-04-07 11:03:28 +00:00
json
lib Revert an accidentally sync. 2023-03-27 12:28:11 +09:00
logger [ruby/logger] Add Logger#with_level{...} for block-scoped log level. 2023-02-10 01:08:49 +00:00
mkmf mkconfig: Map `includedir` only for system ruby 2023-01-31 06:33:16 +09:00
monitor
net s/mjit/rjit/ 2023-03-06 23:44:01 -08:00
nkf
objspace Fix interpreter crash caused by RUBY_INTERNAL_EVENT_NEWOBJ + Ractors 2023-03-09 09:46:14 +01:00
open-uri Add :ssl_min_version and :ssl_max_version options 2022-10-12 10:36:51 +09:00
openssl [ruby/openssl] Relax error message check for OpenSSL 3.1 2023-03-16 17:17:46 +09:00
optparse [ruby/optparse] Add symbolize_names to getopts 2022-12-26 15:09:21 +09:00
ostruct
pathname
psych [ruby/psych] Update for stricter 1.2 syntax 2023-01-31 13:14:05 +09:00
racc [ruby/racc] Get rid of anonymous eval calls 2023-01-12 07:52:29 +09:00
rdoc [ruby/rdoc] Read generated files in binary mode 2023-03-31 01:14:34 +00:00
readline [ruby/readline-ext] test_readline.rb only needs EnvUtil 2023-02-22 01:18:26 +00:00
reline [ruby/reline] Change Reline.add_dialog_proc(name, nil) to properly 2023-04-15 09:32:05 +00:00
resolv [ruby/resolv] Do not compress domain name in SRV RDATA 2023-04-08 14:16:59 +00:00
rinda s/MJIT/RJIT/ 2023-03-06 23:44:01 -08:00
ripper [Bug #19563] Yield words separators per lines 2023-04-07 23:13:56 +09:00
ruby skip if `DidYouMean.formatter=` is not defined 2023-04-16 09:26:56 +09:00
rubygems [rubygems/rubygems] Extract alias variables for long name class 2023-04-13 08:38:46 +00:00
socket Skip test_udp_server on s390x RHEL 7.1 2023-03-11 20:51:49 -08:00
stringio [ruby/stringio] [Bug #19389] Fix chomping with longer separator 2023-01-28 13:00:08 +00:00
strscan [ruby/strscan] Mask out this test on JRuby/Windows 2023-02-21 19:31:39 +09:00
syslog
uri [ruby/uri] Increase rehearsals 2023-03-29 09:52:33 +09:00
win32ole [ruby/win32ole] Skip test failure with mswin platform 2023-03-29 04:00:22 +00:00
yaml Relax the timeout of a YAML test 2022-12-01 15:37:41 -08:00
zlib [ruby/zlib] Fix the test broken in older versions 2023-01-09 09:58:43 +00:00
runner.rb Use the built bundled gems in test-all as well as test-bundled-gems 2022-12-09 02:20:16 +09:00
test_abbrev.rb
test_delegate.rb [ruby/delegate] Revert "Fix `DelegateClass` block "method redefined" warning" 2022-12-01 08:08:02 +00:00
test_extlibs.rb
test_find.rb
test_forwardable.rb
test_getoptlong.rb
test_ipaddr.rb
test_mutex_m.rb [ruby/mutex_m] Avoid anonymous eval 2023-01-12 05:41:59 +00:00
test_observer.rb
test_open3.rb Removed to load jit_support.rb 2023-03-14 12:51:58 +09:00
test_pp.rb [ruby/pp] [Feature #19045] Add support Data#pretty_print 2022-10-14 21:31:24 +09:00
test_prettyprint.rb
test_pstore.rb
test_pty.rb
test_rbconfig.rb mkconfig: Map `includedir` only for system ruby 2023-01-31 06:33:16 +09:00
test_securerandom.rb
test_set.rb [ruby/set] Set#merge does not take keyword arguments as a Hash 2023-02-24 11:48:08 +00:00
test_shellwords.rb
test_singleton.rb
test_sorted_set.rb
test_syslog.rb
test_tempfile.rb
test_time.rb [ruby/time] Test for quadratic backtracking on invalid time 2023-03-30 10:44:37 +00:00
test_timeout.rb [ruby/timeout] Simplify test 2023-02-15 19:25:05 +00:00
test_tmpdir.rb [ruby/tmpdir] Warnings should contain the environment variable name 2022-10-27 03:12:00 +00:00
test_trick.rb Add all-ruby-quine as a sample code 2023-02-27 11:20:42 +09:00
test_tsort.rb
test_unicode_normalize.rb Prefer to use File.readlines instead of IO.readlines 2023-02-27 18:49:18 +09:00
test_weakref.rb