17738: Fixes the issue by strip!()ing a mutable version of OS_VERSION.
[arvados.git] / sdk / ruby / lib / arvados / google_api_client.rb
index 69383d12f63f22ded7957c25fd012d7530763ae4..5a41b11c4f3c20c001c8c6e53f99b9e08438ba07 100644 (file)
@@ -6,7 +6,8 @@ require 'google/api_client'
 # Monkeypatch google-api-client gem to avoid sending newline characters
 # on headers to make ruby-2.3.7+ happy.
 # See: https://dev.arvados.org/issues/13920
-Google::APIClient::ENV::OS_VERSION.strip!
+# Addendum: OS_VERSION sometimes is not mutable, that's why we duplicate it (See: #17738)
+Google::APIClient::ENV::OS_VERSION = +Google::APIClient::ENV::OS_VERSION.strip!
 
 require 'json'
 require 'tempfile'