From 4183d5dfa1d6d651232a4db44a1fcf71d220af4e Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 16 Jul 2017 18:11:03 +0900 Subject: Enable `Layout/FirstParameterIndentation` cop We have some indentation cops. But now there is a little inconsistent params indentations. Enable `Layout/FirstParameterIndentation` cop to prevent newly inconsistent indentation added and auto-correct to existing violations. --- activesupport/lib/active_support/inflector/transliterate.rb | 7 ++++--- activesupport/test/clean_backtrace_test.rb | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/inflector/transliterate.rb b/activesupport/lib/active_support/inflector/transliterate.rb index 246fe7a916..aa7b21734e 100644 --- a/activesupport/lib/active_support/inflector/transliterate.rb +++ b/activesupport/lib/active_support/inflector/transliterate.rb @@ -61,9 +61,10 @@ module ActiveSupport def transliterate(string, replacement = "?".freeze) raise ArgumentError, "Can only transliterate strings. Received #{string.class.name}" unless string.is_a?(String) - I18n.transliterate(ActiveSupport::Multibyte::Unicode.normalize( - ActiveSupport::Multibyte::Unicode.tidy_bytes(string), :c), - replacement: replacement) + I18n.transliterate( + ActiveSupport::Multibyte::Unicode.normalize( + ActiveSupport::Multibyte::Unicode.tidy_bytes(string), :c), + replacement: replacement) end # Replaces special characters in a string so that it may be used as part of diff --git a/activesupport/test/clean_backtrace_test.rb b/activesupport/test/clean_backtrace_test.rb index e9361ecd26..1b44c7c9bf 100644 --- a/activesupport/test/clean_backtrace_test.rb +++ b/activesupport/test/clean_backtrace_test.rb @@ -10,8 +10,8 @@ class BacktraceCleanerFilterTest < ActiveSupport::TestCase test "backtrace should filter all lines in a backtrace, removing prefixes" do assert_equal \ - ["/my/class.rb", "/my/module.rb"], - @bc.clean(["/my/prefix/my/class.rb", "/my/prefix/my/module.rb"]) + ["/my/class.rb", "/my/module.rb"], + @bc.clean(["/my/prefix/my/class.rb", "/my/prefix/my/module.rb"]) end test "backtrace cleaner should allow removing filters" do -- cgit v1.2.3