kpumuk commented on code in PR #3725:
URL: https://github.com/apache/thrift/pull/3725#discussion_r3792758990


##########
lib/rb/spec/socket_spec_shared.rb:
##########
@@ -121,15 +121,15 @@
     @socket.timeout = 0.5
     @socket.open
     expect(@handle).to 
receive(:read_nonblock).with(17).and_raise(IO::EAGAINWaitReadable)
-    expect(IO).to receive(:select).once { sleep(0.6); nil }
+    expect(IO).to(receive(:select).once { sleep(0.6); nil })

Review Comment:
   Not applicable here. The block is intentionally passed to 
`RSpec::Mocks::MessageExpectation#once`; RSpec defines `once(&block)` to 
install it as the mock implementation. The added `to(...)` parentheses resolve 
the ambiguous outer block association. `and_wrap_original` is for wrapping or 
delegating to the real `IO.select`, while this test must replace it with 
`sleep(0.6); nil`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to