Closed IevgenRagulin closed 5 years ago
After https://github.com/ostinelli/apnotic/commit/211f8b01a3d0e9bf783385b5c8a9869af9ceef1a you need to specify a block:
APNOTIC_POOL = Apnotic::ConnectionPool.new({
cert_path: Rails.root.join("config", "certs", "apns_certificate.pem"),
cert_pass: "mypass"
}, size: 5) do |connection|
connection.on(:error) { |exception| puts "Exception has been raised: #{exception}" }
end
This is what LocalJumpError: no block given (yield)
means.
cc @krasnoukhov
Yeah, a block is required now, this is why exception is raised
Right, except this is not backwards compatible. A little borderline re: SemVer, but will maybe just clarify the error a little better.
Ok, makes sense to clarify it. I think it was meant to not be backwards compatible so users will have to change in order to make this code safe
Apnotic upgraded to 1.4.1
with hopefully a clear action point: https://github.com/ostinelli/apnotic/commit/76418499e1052f719d21a419ef0e962d79761f97
@IevgenRagulin thank you for reporting this.
I've just updated to 1.4.0 version (I did that accidentally, I wanted to use 1.3.1), and I started getting this error:
LocalJumpError: no block given (yield)
for this code: