rspec VarSet

This commit is contained in:
josh committed 2013-10-04 20:18:40 -04:00
1 parent 0facfb274d
commit c258dc379f
2 files changed
+116 -2

No files matched your search

+2 -2
View File
@@ -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