aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_dispatch/http/url.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/http/url.rb b/actionpack/lib/action_dispatch/http/url.rb
index 97cd32a308..0215de5d55 100644
--- a/actionpack/lib/action_dispatch/http/url.rb
+++ b/actionpack/lib/action_dispatch/http/url.rb
@@ -12,11 +12,11 @@ module ActionDispatch
self.tld_length = 1
class << self
- def extract_domain(host, tld_length = @@tld_length)
+ def extract_domain(host, tld_length)
host.split('.').last(1 + tld_length).join('.') if named_host?(host)
end
- def extract_subdomains(host, tld_length = @@tld_length)
+ def extract_subdomains(host, tld_length)
if named_host?(host)
parts = host.split('.')
parts[0..-(tld_length + 2)]
@@ -25,7 +25,7 @@ module ActionDispatch
end
end
- def extract_subdomain(host, tld_length = @@tld_length)
+ def extract_subdomain(host, tld_length)
extract_subdomains(host, tld_length).join('.')
end