Repository navigation
Remove SecurityBuffer#value before redefining it in test_auth.rb - #487
Conversation
|
Ugh, sorry I have already addressed mostly-equivalent fixes (+CI improvements) on #488. I should have checked yours carefully beforehand... 🤦 |
| @active && @value ? @value.size : 0 | ||
| end | ||
|
|
||
| remove_method(:value) if method_defined?(:value) |
There was a problem hiding this comment.
This was not actually included in #488. It'd be still worthwhile to accept this change.... 🤔
There was a problem hiding this comment.
Thanks for checking. I've rebased this onto master and dropped the commits already covered by #488, so this pull request now only contains the SecurityBuffer#value change.
It removes the original method before redefining it, the same way data_size already is, to silence method redefined; discarding old value.
Lines 133 to 136 in fb499dd
Avoids the following warning, matching how data_size is already
redefined:
test/test_auth.rb:131: warning: method redefined; discarding old value
vendor/bundle/ruby/4.0.0/bundler/gems/rubyntlm-59ac920c56d8/lib/net/ntlm/security_buffer.rb:33: warning: previous definition of value was here
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SecurityBuffer#value before redefining it in test_auth.rb
yyuu
left a comment
There was a problem hiding this comment.
looks good 👍 CI failures are not something derived from changes, but it’d be just some flakiness of current test setup. Will address it separately….
Summary
test/test_auth.rbredefinesNet::NTLM::SecurityBuffer#valuewithout removing the original method first, which emitsmethod redefined; discarding old value. This removes the method before redefining it, as is already done fordata_size.The other warnings originally addressed here were fixed by #488.