lib/detect_language.rb in detect_language-1.1.0 vs lib/detect_language.rb in detect_language-1.1.1
- old
+ new
@@ -16,10 +16,10 @@
def configuration
@configuration ||= Configuration.new
end
def client
- @client ||= Client.new(configuration)
+ Thread.current[:detect_language_client] ||= Client.new(configuration)
end
def detect(data)
key = data.is_a?(Array) ? 'q[]' : 'q'
result = client.post(:detect, key => data)