diff options
author | Akira Matsuda <ronnie@dio.jp> | 2015-09-18 18:41:26 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2015-09-20 05:10:11 +0900 |
commit | 44e5ebf688f062bb38501c8de817e0d484999001 (patch) | |
tree | a27676c58443f567c460a137ba8c8f408f4402f9 /activesupport | |
parent | cd89e5c8c79d29cee52ed66ac43b8e34887d2c31 (diff) | |
download | rails-44e5ebf688f062bb38501c8de817e0d484999001.tar.gz rails-44e5ebf688f062bb38501c8de817e0d484999001.tar.bz2 rails-44e5ebf688f062bb38501c8de817e0d484999001.zip |
s/seperator/separator/g
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/inflector/transliterate.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/inflector/transliterate.rb b/activesupport/lib/active_support/inflector/transliterate.rb index aefcf73622..7472d4386a 100644 --- a/activesupport/lib/active_support/inflector/transliterate.rb +++ b/activesupport/lib/active_support/inflector/transliterate.rb @@ -75,15 +75,15 @@ module ActiveSupport parameterized_string.gsub!(/[^a-z0-9\-_]+/i, sep) unless sep.nil? || sep.empty? if sep == "-".freeze - re_duplicate_seperator = /-{2,}/ + re_duplicate_separator = /-{2,}/ re_leading_trailing_separator = /^-|-$/i else re_sep = Regexp.escape(sep) - re_duplicate_seperator = /#{re_sep}{2,}/ + re_duplicate_separator = /#{re_sep}{2,}/ re_leading_trailing_separator = /^#{re_sep}|#{re_sep}$/i end # No more than one of the separator in a row. - parameterized_string.gsub!(re_duplicate_seperator, sep) + parameterized_string.gsub!(re_duplicate_separator, sep) # Remove leading/trailing separator. parameterized_string.gsub!(re_leading_trailing_separator, ''.freeze) end |