lib/anyway/env.rb in anyway_config-1.1.0 vs lib/anyway/env.rb in anyway_config-1.1.1

- old
+ new

@@ -1,11 +1,15 @@ # frozen_string_literal: true +require 'anyway/ext/deep_dup' + module Anyway # Parses environment variables and provides # method-like access class Env + using Anyway::Ext::DeepDup + # Regexp to detect array values # Array value is a values that contains at least one comma # and doesn't start/end with quote ARRAY_RXP = /\A[^'"].*\s*,\s*.*[^'"]\z/ @@ -17,9 +21,10 @@ @data.clear end def fetch(config_name) @data[config_name] ||= parse_env(config_name) + @data[config_name].deep_dup end private def parse_env(config_name)