From: "shyouhei (Shyouhei Urabe)" Date: 2012-05-13T00:01:55+09:00 Subject: [ruby-core:45010] [ruby-trunk - Bug #6427][Rejected] ruby ioctl: Error integer 2148012656 too big to convert to `int' Issue #6427 has been updated by shyouhei (Shyouhei Urabe). Status changed from Open to Rejected Both ruby and glibc header file (and Ubuntu's manpage of ioctl(2)) agree that ioctl takes int, and 2148012656 is greater than INT_MAX. Hence the exception. You have to use -2146954640 instead. ---------------------------------------- Bug #6427: ruby ioctl: Error integer 2148012656 too big to convert to `int' https://bugs.ruby-lang.org/issues/6427#change-26593 Author: hadmut (Hadmut Danisch) Status: Rejected Priority: Normal Assignee: Category: Target version: ruby -v: ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] Hi, the upgrade to ubuntu 12.04 came with an upgrade to ruby 1.9.3. Unfortunately, in recent 1.9.3 versions of ruby there's a bug in the ioctl function. E.g. if you want to do getbsz() on a block device and do a f.ioctl(0x80081270,a) you'll get the error message Error integer 2148012656 too big to convert to `int' RangeError (2148012656 = 0x80081270) So ruby can't do ioctl's anymore if the highest bit is set in the ioctl code. This was working code in ruby 1.9.2 / ubuntu 11.10. regards -- http://bugs.ruby-lang.org/