Tim Sutherland said:
>>>>I get the following error
>>>>(eval):2 in '[]': unsupported type 'p' (DL::DLTypeError)
>>>>  from (eval):2:in 'bp'
>
> Okay, this is a bug in newer versions of the dl extension.

I fixed that.
Please replace import.rb, types.rb and struct.rb in lib/ruby/dl
with files shown at the following URL.
http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/ext/dl/lib/dl/

Regards,
-- 
Takaaki Tateishi <ttate / ttsky.net>