Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Perform auto correct for
Performance/RegexpMatch
cop
* Use RuboCop Performance 1.4.1 * Refer rubocop/rubocop-performance#61 and/or rubocop/rubocop-performance#73 ```ruby $ bundle exec rubocop -a Inspecting 66 files ..........C..C..C......C.................C........................ Offenses: lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:68:21: C: [Corrected] Performance/RegexpMatch: Use match? instead of =~ when MatchData is not used. return if sql =~ /FROM all_/ ^^^^^^^^^^^^^^^^^^ lib/active_record/connection_adapters/oracle_enhanced/jdbc_connection.rb:241:26: C: [Corrected] Performance/RegexpMatch: Use match? instead of =~ when MatchData is not used. raise unless e.message =~ /^(Closed Connection|Io exception:|No more data to read from socket|IO Error:)/ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:321:35: C: [Corrected] Performance/RegexpMatch: Use match? instead of =~ when MatchData is not used. host = "[#{host}]" if host =~ /^[^\[].*:/ # IPv6 ^^^^^^^^^^^^^^^^^^^ lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:323:46: C: [Corrected] Performance/RegexpMatch: Use match? instead of match when MatchData is not used. database = "/#{database}" unless database.match(/^\//) ^^^^^^^^^^^^^^^^^^^^^ lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:650:46: C: [Corrected] Performance/RegexpMatch: Use match? instead of =~ when MatchData is not used. field["data_default"] = nil if field["data_default"] =~ /^(null|empty_[bc]lob\(\))$/i ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ spec/active_record/connection_adapters/oracle_enhanced/connection_spec.rb:183:58: C: [Corrected] Performance/RegexpMatch: Use match? instead of match when MatchData is not used. params[:database] = "/#{params[:database]}" unless params[:database].match(/^\//) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 66 files inspected, 6 offenses detected, 6 offenses corrected $ ```
- Loading branch information