geemus/excon — Issue #98: Doesn't work on Rubinius
Author: mislav
Created: 2011-12-30 16:59:45+00:00
State: open

~~~
$ ruby -v
rubinius 1.2.4 (1.8.7 release 2011-07-05 JI) [x86_64-apple-darwin11.2.0]
~~~

Proof:

~~~ rb
require 'excon'
conn = ::Excon.new('http://localhost:4567/echo')
resp = conn.request :method => 'GET'
~~~

Error:

~~~
An exception occurred running test/excon.rb
Tried to use non-reference value 0x1a as type Bignum (8) (Excon::Errors::SocketError)

Backtrace:
FFI::Struct(Socket::Foreign::AddrInfo)#[]= at kernel/platform/struct.rb:245
Socket::Foreign.getaddrinfo at /Users/mislav/.rbenv/versions/rbx-1.2.4
/lib/socket.rb:267
Socket.getaddrinfo at /Users/mislav/.rbenv/versions/rbx-1.2.4
/lib/socket.rb:541
Excon::Socket#connect at /Users/mislav/.rbenv/versions/rbx-1.2.4
/1.8/gems/excon-0.9.4/lib/excon
/socket.rb:26
Excon::Socket#initialize at /Users/mislav/.rbenv/versions/rbx-1.2.4
/1.8/gems/excon-0.9.4/lib/excon
/socket.rb:16
Excon::Connection#socket at /Users/mislav/.rbenv/versions/rbx-1.2.4
/1.8/gems/excon-0.9.4/lib/excon
/connection.rb:291
Excon::Connection#request_kernel at /Users/mislav/.rbenv/versions/rbx-1.2.4
/1.8/gems/excon-0.9.4/lib/excon
/connection.rb:145
Excon::Connection#request at /Users/mislav/.rbenv/versions/rbx-1.2.4
/1.8/gems/excon-0.9.4/lib/excon
/connection.rb:89
Object#__script__ at test/excon.rb:4
Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:65
Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:90
Rubinius::Loader#script at kernel/loader.rb:618
Rubinius::Loader#main at kernel/loader.rb:762
~~~