Skip to content

Commit

Permalink
Remove runtime error handler, dup environment string.
Browse files Browse the repository at this point in the history
  • Loading branch information
jokull committed Apr 21, 2012
1 parent b24842a commit 75ddd39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/haste.rb
Expand Up @@ -33,7 +33,7 @@ def start
else else
abort "failure uploading: #{response.code}" abort "failure uploading: #{response.code}"
end end
rescue RuntimeError, JSON::ParserError => e rescue JSON::ParserError => e
abort "failure uploading: #{response.code}" abort "failure uploading: #{response.code}"
rescue Errno::ECONNREFUSED => e rescue Errno::ECONNREFUSED => e
abort "failure connecting: #{e.message}" abort "failure connecting: #{e.message}"
Expand All @@ -43,7 +43,7 @@ def start


def server def server
return @server if @server return @server if @server
@server = ENV['HASTE_SERVER'] || Haste::DEFAULT_URL @server = ENV['HASTE_SERVER'].dup() || Haste::DEFAULT_URL

This comment has been minimized.

Copy link
@seejohnrun

seejohnrun Apr 23, 2012

I'm going to remove the () from this line - otherwise looks good - thanks!

@server.chop! if server.end_with?('/') @server.chop! if server.end_with?('/')
@server @server
end end
Expand Down

0 comments on commit 75ddd39

Please sign in to comment.