How about `@filename = @url.split('/').pop()`?