def set_option(option, *args)
      if Call.respond_to?(:libusb_set_option)
        # Available since libusb-1.0.22

        ffi_args = case option
          when :OPTION_LOG_LEVEL, LIBUSB::OPTION_LOG_LEVEL
            expect_option_args(1, args.length)
            [:libusb_log_level, args[0]]
          when :OPTION_USE_USBDK, LIBUSB::OPTION_USE_USBDK
            expect_option_args(0, args.length)
            []
          else
            raise ArgumentError, "unknown option #{option.inspect}"
        end

        res = Call.libusb_set_option(@ctx, option, *ffi_args)
        LIBUSB.raise_error res, "in libusb_set_option" if res<0

      else
        # Fallback to deprecated function, if the gem is linked to an older libusb.

        raise ArgumentError, "unknown option #{option.inspect}" unless [:OPTION_LOG_LEVEL, LIBUSB::OPTION_LOG_LEVEL].include?(option)
        Call.libusb_set_debug(@ctx, *args)
      end
    end
def set_option(option, *args)
      if Call.respond_to?(:libusb_set_option)
        # Available since libusb-1.0.22

        ffi_args = case option
          when :OPTION_LOG_LEVEL, LIBUSB::OPTION_LOG_LEVEL
            expect_option_args(1, args.length)
            [:libusb_log_level, args[0]]
          when :OPTION_USE_USBDK, LIBUSB::OPTION_USE_USBDK
            expect_option_args(0, args.length)
            []
          else
            raise ArgumentError, "unknown option #{option.inspect}"
        end

        res = Call.libusb_set_option(@ctx, option, *ffi_args)
        LIBUSB.raise_error res, "in libusb_set_option" if res<0

      else
        # Fallback to deprecated function, if the gem is linked to an older libusb.

        raise ArgumentError, "unknown option #{option.inspect}" unless [:OPTION_LOG_LEVEL, LIBUSB::OPTION_LOG_LEVEL].include?(option)
        Call.libusb_set_debug(@ctx, *args)
      end
    end
Set a libusb option from the {Call::Options option list}.

 @param [Symbol, Fixnum] option
 @param args  Zero or more arguments depending on +option+