From 3aabac5b0d6ebf3647b6150803219d6acb5c33a6 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 11 Jun 2014 14:32:18 -0700 Subject: these methods are always called with a tld_parameter remove the default parameter since the methods are always called with a parameter --- actionpack/lib/action_dispatch/http/url.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_dispatch/http') 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 -- cgit v1.2.3