Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed nil bug in Url.base

  • Loading branch information...
commit e147ee13cda2d086297ed9cf2cba28480d1a59dc 1 parent 272229a
Andreas Zecher authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/raev/url.rb
6 lib/raev/url.rb
View
@@ -8,8 +8,10 @@ def initialize(url)
@url = url
end
- def base
- @url.split('/')[2].gsub('www.', '')
+ def base
+ base_url = @url.split('/')[2]
+ base_url = base_url.gsub('www.', '') unless base_url.nil?
+ base_url
end
def clean
Please sign in to comment.
Something went wrong with that request. Please try again.