lib/bls/field.rb in bls12-381-0.2.1 vs lib/bls/field.rb in bls12-381-0.2.2

- old
+ new

@@ -61,9 +61,18 @@ def div(other) v = other.is_a?(Field) ? other.invert : self.class.new(other).invert multiply(v) end alias / div + + def to_s + value.to_s + end + + def ==(other) + return false unless other.is_a?(self.class) + value == other.value + end end # Finite field over q. class Fq include Field