```ruby
module ZeroMQ
  module Errors
    ERRORS = Errno.constants.map(&Errno.method(:const_get)).
             inject({}) { |map, error| map[error.const_get(:Errno)] = error; map }

    private

    def check_result!(rc)
      return rc if ZMQ::Util.resultcode_ok?(rc)
      raise ERRORS.fetch(ZMQ::Util.errno) { ZMQ::Util.error_string }
    end
  end
end
```

Select only the constants that are actually Errors
user
```ruby
module ZeroMQ
  module Errors
    ERRORS = Errno.constants.map(&Errno.method(:const_get)).
             select { |obj| obj.is_a?(Class) && obj < SystemCallError }.
             inject({}) { |map, error| map[error.const_get(:Errno)] = error; map }

    private

    def check_result!(rc)
      return rc if ZMQ::Util.resultcode_ok?(rc)
      raise ERRORS.fetch(ZMQ::Util.errno) { ZMQ::Util.error_string }
    end
  end
end
```
assistant