Wrong argument type String (expected Data) (TypeError) on 1.8 with dl

1.8 e$B$G$H$-$*$je(B RubySpec e$B$,Mn$A$k$N$G!"e(B
e$B$A$g$C$H$$F$$?$ie(B DL e$B$r;H$C$F$^$7$?!#e(B

-e:7:in `[]’: wrong argument type String (expected Data) (TypeError)

% ./ruby -rdl -ve ’
GC.stress = true
10.times {
ptr = [“ABC”].pack(“p”)
addr = ptr.unpack(“L”).first
dptr = DL::PtrData.new(addr, 1)
p dptr[0,1]

ruby 1.8.7 (2008-12-21 revision 20895) [i686-linux]
-e:7:in []': wrong argument type String (expected Data) (TypeError) from -e:7 from -e:3:intimes’
from -e:3

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs