lib/build/rule.rb in build-2.4.3 vs lib/build/rule.rb in build-2.4.4

- old
+ new

@@ -41,10 +41,11 @@ attr :direction attr :name attr :options + attr :dynamic def input? @direction == :input end @@ -94,10 +95,19 @@ else arguments[@name] end || @options[:default] end + def hash + [self.class, @direction, @name, @options].hash + end + + # TODO fix implementation + def eql? other + other.kind_of?(self.class) and @direction.eql?(other.direction) and @name.eql?(other.name) and @options.eql?(other.options) # and @dynamic == other.dynamic + end + def inspect "#{direction}:#{@name} (#{options.inspect})" end end @@ -215,11 +225,15 @@ if @primary_output arguments[@primary_output.name] end end - def ==(other) - other.kind_of?(self.class) and @name == other.name and @parameters == other.parameters + def hash + [self.class, @name, @parameters].hash + end + + def eql?(other) + other.kind_of?(self.class) and @name.eql?(other.name) and @parameters.eql?(other.parameters) end def to_s "#<#{self.class} #{@name.dump}>" end