lib/pio/open_flow10/set_tos.rb in pio-0.30.0 vs lib/pio/open_flow10/set_tos.rb in pio-0.30.1
- old
+ new
@@ -12,11 +12,11 @@
def initialize(type_of_service)
# tos (IP ToS) value consists of 8 bits, of which only the
# 6 high-order bits belong to DSCP, the 2 low-order bits must
# be zero.
- unless type_of_service.unsigned_8bit? && type_of_service % 4 == 0
- fail ArgumentError, 'Invalid type_of_service (ToS) value.'
+ unless type_of_service.unsigned_8bit? && (type_of_service % 4).zero?
+ raise ArgumentError, 'Invalid type_of_service (ToS) value.'
end
super(type_of_service: type_of_service)
end
end
end