chuckremes/ffi-rzmq — Issue #45: new getsockopt signature
Author: schmurfy
Created: 2011-10-31 11:42:05+00:00
State: open

Hi,
Why did you change the signature of the call in latest version instead of raising an error ?
If you wanted to make your api looks like C I think you succeeded but that's not really the ruby way...

The current code:

```ruby
array = []
rc = socket.getsockopt(ZMQ::HWM, array)
hwm = array.first if ZMQ::Util.resultcode_ok?(rc)
```

And what it could be:

```ruby
begin
hwm = socket.getsockopt(ZMQ::HWM)
rescue ZMQ::OperationFailed => err
# do something
end
```

Since looking at the first really makes me sick I can even provide the pull request, but would you accept it ?