Guest User

Untitled

a guest
Jul 16th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. VALUE
  2. method_initialize (VALUE dl)
  3. {
  4. int rc;
  5.  
  6. rc = usb_init (NUM2INT(dl));
  7. if (rc)
  8. return Qnil;
  9. rc = usb_open_dev ();
  10. if (rc)
  11. return Qnil;
  12. }
  13.  
  14. rb_define_method(HTLLUSB, "initialize", method_initialize, 1);
  15.  
  16. @dev = HTLLUSB.new 2
  17.  
  18. leads to:
  19. usb_iface.rb:7:in `initialize': can't convert HTLLUSB into Integer (TypeError)
Add Comment
Please, Sign In to add comment