lib/spf/request.rb in spf-0.0.55 vs lib/spf/request.rb in spf-0.1

- old
+ new

@@ -40,15 +40,15 @@ versions_for_scope = VERSIONS_FOR_SCOPE[@scope] or raise SPF::InvalidScopeError.new("Invalid scope '#{@scope}'") # Versions: if @versions - if Fixnum === @versions - # Single version specified as a Fixnum: + if Integer === @versions + # Single version specified as a Integer: @versions = [@versions] elsif not Array === @versions - # Something other than Fixnum or array specified: + # Something other than Integer or array specified: raise SPF::InvalidOptionValueError.new("'versions' option must be symbol or array") end # All requested record versions must be supported: unsupported_versions = @versions.select { |x| @@ -135,10 +135,10 @@ def state(field, value = nil) unless field raise SPF::OptionRequiredError.new('Field name required') end if value - if Fixnum === value + if Integer === value @state[field] = 0 unless @state[field] return (@state[field] += value) else return (@state[field] = value) end