diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-05-03 22:24:44 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-09-29 21:00:26 +0900 |
| commit | b7bca0ebdc5a48c487bc4fa42e749bb23f66bca0 (patch) | |
| tree | 680e65d42b710281a37f105c2a67f5bdbff396e9 /ext | |
| parent | 1179c86384bb6211d45bf721651b100dca1fb53e (diff) | |
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11722
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/win32/lib/win32/sspi.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/win32/lib/win32/sspi.rb b/ext/win32/lib/win32/sspi.rb index 9dbd4377a4..9407237b34 100644 --- a/ext/win32/lib/win32/sspi.rb +++ b/ext/win32/lib/win32/sspi.rb @@ -202,10 +202,13 @@ module Win32 end def ==(other) - if other.is_a?(SSPIResult) + case other + when SSPIResult @value == other.value - elsif other.is_a?(Integer) - @value == @@map[other] + when Integer + @value == other + when Symbol + @@map[@value] == other else false end |
