rspec VarSet
This commit is contained in:
1 parent
0facfb274d
commit
c258dc379f
2 files changed
+116
-2
No files matched your search
@@ -24,9 +24,9 @@ module Rscons
|
||||
# returned.
|
||||
def [](key, type = nil)
|
||||
val = @vars[key]
|
||||
if type == :array and val.is_a?(String)
|
||||
if type == :array and not val.is_a?(Array)
|
||||
[val]
|
||||
elsif type == :string and val.is_a?(Array)
|
||||
elsif type == :scalar and val.is_a?(Array)
|
||||
val.first
|
||||
else
|
||||
val
|
||||
|
||||
Reference in new issue
Block a user