mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
win32/sspi: Fix Win32::SSPI::SSPIResult#== with Integer
The values of `@@map` are `Symbol`s and `@value` should be an `Integer` since unpacked as unsigned long, so this comparison should be false always. Probably comparison with `Symbol` was intended.
This commit is contained in:
parent
1179c86384
commit
b7bca0ebdc
Notes:
git
2024-09-29 12:34:34 +00:00
1 changed files with 6 additions and 3 deletions
|
@ -202,10 +202,13 @@ module Win32
|
||||||
end
|
end
|
||||||
|
|
||||||
def ==(other)
|
def ==(other)
|
||||||
if other.is_a?(SSPIResult)
|
case other
|
||||||
|
when SSPIResult
|
||||||
@value == other.value
|
@value == other.value
|
||||||
elsif other.is_a?(Integer)
|
when Integer
|
||||||
@value == @@map[other]
|
@value == other
|
||||||
|
when Symbol
|
||||||
|
@@map[@value] == other
|
||||||
else
|
else
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue