Azure / azure-storage-ruby

Microsoft Azure Storage Library for Ruby
http://azure.github.io/azure-storage-ruby/
84 stars 150 forks source link

Warning message when both azure-storage-blob and azure-storage-queue installed #195

Open KNejad opened 2 years ago

KNejad commented 2 years ago

If you have both azure-storage-blob and azure-storage-queue installed, you get this warning message:

/usr/local/bundle/gems/azure-storage-blob-1.1.0/lib/azure/storage/blob/blob_service.rb:33: warning: already initialized constant Azure::Storage::StorageService
/usr/local/bundle/gems/azure-storage-queue-1.1.0/lib/azure/storage/queue/queue_service.rb:28: warning: previous definition of StorageService was here

I have version 1.1 installed but I tried with the latest and the same warning message appears

abuche-corpiq commented 1 year ago

I believe that the initialization of these constant should be changed to use the ||= operator. This would fix any combinations of multiple gems in a project.