Ruby - IO#ioctl throws range error in 1.9.3 but not 1.9.1 for 32bit -


ruby-1.9.1-p243 :008 > a,b = io.pipe => [#<io:0x2010670>, #<io:0x2010654>]  ruby-1.9.1-p243 :009 > a.ioctl(0x80000000, "\x00\x00")     errno::enotty: inappropriate ioctl device     (irb):9:in `ioctl'     (irb):9     /users/dlampa/.rvm/rubies/ruby-1.9.1-p243/bin/irb:16:in `<main>' 

this work if io object appropriate device , command valid.

ruby-1.9.3-p0 :022 > a,b = io.pipe => [#<io:fd 9>, #<io:fd 10>]  ruby-1.9.3-p0 :023 > a.ioctl(0x80000000, "\x00\x00") rangeerror: bignum big convert `long'     (irb):23:in `ioctl'     (irb):23     /users/dlampa/.rvm/rubies/ruby-1.9.3-p0/bin/irb:16:in `<main>' 

on macosx 10.6.8

i'm assuming has bit signing (maybe), , have packed , unpacked things signed , unsigned, nothing seems prevent 1.9.3 throwing range error. of course, there's no problem in 64-bit implementations. i'm totally confused. can explain why happening , perhaps provide workaround?

edit: command works in 1.9.2-p290, there change 1.9.2 1.9.3

ruby-1.9.2-p290 :001 > a,b = io.pipe  => [#<io:fd 3>, #<io:fd 4>]  ruby-1.9.2-p290 :002 > a.ioctl(0x80000000, "\x00\x00") errno::enotty: inappropriate ioctl device     (irb):2:in `ioctl'     (irb):2     /users/dlampa/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `<main>' 


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -