mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
40db515e91
This pull request addresses the following warnings enabled since ruby/ruby#4070 * Warnings without this fix 1 ``` % ruby -v ruby 3.1.0dev (2021-02-01T10:54:21Z master 1cdae49d39) [x86_64-darwin20] % bin/test test/cases/arel/visitors/sqlite_test.rb:36 ... snip ... /Users/yahonda/src/github.com/rails/rails/activerecord/test/cases/arel/support/fake_record.rb:98: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v). . Finished in 0.003538s, 2261.1645 runs/s, 2543.8101 assertions/s. 8 runs, 9 assertions, 0 failures, 0 errors, 0 skips % ``` * Warnings without this fix 2 ```ruby % ruby -v ruby 3.1.0dev (2021-02-01T10:54:21Z master 1cdae49d39) [x86_64-darwin20] % bin/test test/cases/type/adapter_specific_registry_test.rb Using sqlite3 Run options: --seed 53175 ......./Users/yahonda/src/github.com/rails/rails/activerecord/test/cases/type/adapter_specific_registry_test.rb:126: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v). /Users/yahonda/src/github.com/rails/rails/activemodel/lib/active_model/type/registry.rb:18: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v). /Users/yahonda/src/github.com/rails/rails/activerecord/test/cases/type/adapter_specific_registry_test.rb:130: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v). /Users/yahonda/src/github.com/rails/rails/activemodel/lib/active_model/type/registry.rb:18: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v). .../Users/yahonda/src/github.com/rails/rails/activerecord/test/cases/type/adapter_specific_registry_test.rb:85: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v). /Users/yahonda/src/github.com/rails/rails/activemodel/lib/active_model/type/registry.rb:18: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v). /Users/yahonda/src/github.com/rails/rails/activerecord/test/cases/type/adapter_specific_registry_test.rb:86: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v). /Users/yahonda/src/github.com/rails/rails/activemodel/lib/active_model/type/registry.rb:18: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v). . Finished in 0.011424s, 962.8852 runs/s, 2450.9804 assertions/s. 11 runs, 28 assertions, 0 failures, 0 errors, 0 skips % ``` * Warnings without this fix 3 ```ruby $ cd actionview $ bin/test test/template/url_helper_test.rb Run options: --seed 27105 ........................../home/yahonda/src/github.com/rails/rails/actionview/test/template/url_helper_test.rb:88: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v). .............................../home/yahonda/src/github.com/rails/rails/actionview/test/template/url_helper_test.rb:94: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v). ..................................................../home/yahonda/src/github.com/rails/rails/actionview/test/template/url_helper_test.rb:71: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v). ...................... Finished in 0.305066s, 429.4159 runs/s, 580.2032 assertions/s. 131 runs, 177 assertions, 0 failures, 0 errors, 0 skips $ ``` Refer: ruby/ruby#4070 https://bugs.ruby-lang.org/issues/16806 Co-authored-by: Ryuta Kamizono <kamipo@gmail.com> |
||
---|---|---|
.. | ||
erb | ||
form_helper | ||
testing | ||
active_model_helper_test.rb | ||
asset_tag_helper_test.rb | ||
atom_feed_helper_test.rb | ||
capture_helper_test.rb | ||
compiled_templates_test.rb | ||
controller_helper_test.rb | ||
csp_helper_test.rb | ||
csrf_helper_test.rb | ||
date_helper_i18n_test.rb | ||
date_helper_test.rb | ||
dependency_tracker_test.rb | ||
digestor_test.rb | ||
erb_util_test.rb | ||
fallback_file_system_resolver_test.rb | ||
file_system_resolver_test.rb | ||
form_collections_helper_test.rb | ||
form_helper_test.rb | ||
form_options_helper_i18n_test.rb | ||
form_options_helper_test.rb | ||
form_tag_helper_test.rb | ||
html_test.rb | ||
javascript_helper_test.rb | ||
log_subscriber_test.rb | ||
lookup_context_test.rb | ||
number_helper_test.rb | ||
optimized_file_system_resolver_test.rb | ||
output_safety_helper_test.rb | ||
partial_iteration_test.rb | ||
record_identifier_test.rb | ||
render_test.rb | ||
resolver_cache_test.rb | ||
resolver_shared_tests.rb | ||
sanitize_helper_test.rb | ||
streaming_render_test.rb | ||
tag_helper_test.rb | ||
template_error_test.rb | ||
template_test.rb | ||
test_case_test.rb | ||
test_test.rb | ||
text_helper_test.rb | ||
text_test.rb | ||
translation_helper_test.rb | ||
url_helper_test.rb |