lib/scope.rb in expressive-0.0.9 vs lib/scope.rb in expressive-0.0.10

- old
+ new

@@ -25,22 +25,22 @@ def [](name) @symbols[name] || @parent[name] end def []=(name, value) - if value + if value if value.is_a?(ExtendedValue) @symbols[name] = value unless @symbols.include?(name) else current_value = @symbols[name] if current_value and current_value.is_a?(ExtendedValue) current_value.set(value) else @symbols[name] = value end end - else + else @symbols[name] = value end end def merge(scope) @@ -125,10 +125,10 @@ define('if') { |*args| args.compact!; args[0] ? args[1] : args[2] } end def to_hash h = self.retrieve_scope.dup - h.delete_if{|k, v| v.kind_of?(Expressive::Function)} + h.delete_if{|k, v| v.kind_of?(Expressive::Function) || v.kind_of?(Expressive::ExtendedValue)} end private #(post "http://example.com" "*" (headers "AUTH-TOKEN=13415") )