We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f7bc91 commit fc7f9b2Copy full SHA for fc7f9b2
1 file changed
lib/config/options.rb
@@ -37,9 +37,9 @@ def reload_env!
37
hash = Hash.new
38
39
ENV.each do |variable, value|
40
- keys = variable.to_s.split(Config.env_separator)
+ keys = split(variable)
41
42
- prefix = (Config.env_prefix || Config.const_name).to_s.split(Config.env_separator)
+ prefix = split(Config.env_prefix || Config.const_name)
43
44
next if keys.shift(prefix.size) != prefix
45
@@ -154,6 +154,10 @@ def []=(param, value)
154
155
protected
156
157
+ def split(string)
158
+ string.to_s.split(Config.env_separator)
159
+ end
160
+
161
def descend_array(array)
162
array.map do |value|
163
if value.instance_of? Config::Options
0 commit comments