lib/specinfra/ec2_metadata.rb in specinfra-2.19.5 vs lib/specinfra/ec2_metadata.rb in specinfra-2.19.6
- old
+ new
@@ -13,10 +13,10 @@
def [](key)
if @metadata[key].nil?
begin
require "specinfra/ec2_metadata/#{key}"
- inventory_class = Specinfra::Ec2Metadata.const_get(key.to_camel_case)
+ inventory_class = Specinfra::Ec2Metadata.const_get(key.to_s.to_camel_case)
@metadata[key] = inventory_class.get
rescue LoadError
@metadata[key] = nil
end
end