Skip to content

Commit 5d1066a

Browse files
authored
Merge pull request #20 from nsajko/prevent_adding_methods_fix
prevent adding new methods to functions `>`, `>=`
2 parents 4854a58 + dd83b59 commit 5d1066a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/math.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Base.one(::Type{<:AbstractQuantity{T}}) where T = one(T) #unitless
144144
Base.oneunit(::Type{<:AbstractQuantity{T,D}}) where {T,D} = quantity(one(T), zero(D)) #unitless with type
145145

146146
#Comparison functions
147-
for f in (:<, :>, :<=, :>=)
147+
for f in (:<, :<=)
148148
@eval function Base.$f(q1::AbstractQuantity, q2::AbstractQuantity)
149149
(b1, b2) = (ubase(q1), ubase(q2))
150150
unit(b1) == unit(b2) || throw(DimensionError(unit(b1), unit(b2)))

0 commit comments

Comments
 (0)