lib/spf/model.rb in spf-0.0.0 vs lib/spf/model.rb in spf-0.0.1
- old
+ new
@@ -205,11 +205,11 @@
def initialize(options)
super()
@text = options[:text]
if not self.instance_variable_defined?(:@parse_text)
- @parse_text = @text
+ @parse_text = @text.dup
end
if self.instance_variable_defined?(:@domain_spec) and
not @domain_spec.is_a?(SPF::MacroString)
@domain_spec = SPF::MacroString.new({:text => @domain_spec})
end
@@ -562,11 +562,11 @@
def initialize(options = {})
@parse_text = options[:parse_text]
@text = options[:text]
@domain_spec = options[:domain_spec]
- @parse_text = @text unless @parse_text
+ @parse_text = @text.dup unless @parse_text
if @domain_spec and not @domain_spec.is_a?(SPF::MacroString)
@domain_spec = SPF::MacroString.new({:text => @domain_spec})
end
end
@@ -717,10 +717,10 @@
'?' => :neutral
}
def initialize(options)
super()
- @parse_text = @text = options[:text] if not self.instance_variable_defined?(:@parse_text)
+ @parse_text = (@text = options[:text] if not self.instance_variable_defined?(:@parse_text)).dup
@terms ||= []
@global_mods ||= {}
end
def self.new_from_string(text, options = {})