Permalink
Browse files

Remove runtime error handler, `dup` environment string.

  • Loading branch information...
1 parent b24842a commit 75ddd3918796dd7403e6943ad737f519fdf2eda0 @jokull committed Apr 21, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/haste.rb
View
@@ -33,7 +33,7 @@ def start
else
abort "failure uploading: #{response.code}"
end
- rescue RuntimeError, JSON::ParserError => e
+ rescue JSON::ParserError => e
abort "failure uploading: #{response.code}"
rescue Errno::ECONNREFUSED => e
abort "failure connecting: #{e.message}"
@@ -43,7 +43,7 @@ def start
def server
return @server if @server
- @server = ENV['HASTE_SERVER'] || Haste::DEFAULT_URL
+ @server = ENV['HASTE_SERVER'].dup() || Haste::DEFAULT_URL
@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
end

0 comments on commit 75ddd39

Please sign in to comment.