RMagick && Pathname

C

Charles Comstock

I don't know who wide spread this is in RMagick, but isn't Pathname supposed to
act like a string or File? Got this error below when I tried to use a pathname
as a parameter to ImageList.new. Is Pathname missing a to_str or something like that
or is RMagick being to strict about checking types? Easy fix to use
pathname.to_s for the arg to work, but I figured someone might like to know.
Charles Comstock

/home/cec/s/c/cc1/usr/lib/ruby/site_ruby/1.8/RMagick.rb:1377:in `read': argument
must be String or File (Pathname given) (TypeError\
)
from /home/cec/s/c/cc1/usr/lib/ruby/site_ruby/1.8/RMagick.rb:1377:in
`initialize'
from /home/cec/s/c/cc1/usr/lib/ruby/site_ruby/1.8/RMagick.rb:1377:in
`each'
from /home/cec/s/c/cc1/usr/lib/ruby/site_ruby/1.8/RMagick.rb:1376:in
`initialize'
from /home/cec/s/c/cc1/usr/lib/ruby/site_ruby/1.8/RMagick.rb:1376:in
`new'
from -:9:in `processImage'
from -:25
from -:24:in `each'
from -:24
from -:24:in `chdir'
from -:23
from -:23:in `each'
from -:21
from -:21
 
T

Tim Hunter

I don't know who wide spread this is in RMagick, but isn't Pathname
supposed to act like a string or File? Got this error below when I tried
to use a pathname as a parameter to ImageList.new. Is Pathname missing a
to_str or something like that or is RMagick being to strict about checking
types? Easy fix to use pathname.to_s for the arg to work, but I figured
someone might like to know.

It's a deficiency in RMagick, which is checking explicitly for either a
T_STRING or a T_FILE. I'll open a bug for it and fix it in the next
release. Thanks for letting me know.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top