Does Ruby have an equivalent to Python's ctypes?

E

Eric Christopherson

From the description I found of ctypes, I think ffi
<https://github.com/ffi/ffi> would be close. Perhaps if you give us
more information about what you want to do, we can give you more
specific recommendations.
 
A

Ammar Ali


Given how easy it is to implement this type functionality in pure
ruby, do you really want the added dependency? Especially on a gem
that's still in beat, hasn't been touched since 2005, and requires a
compiler (sure, no big deal, but character types are not worth all
that ceremony). I stumbled across this gem when I was searching for
ctype functionality (http://www.ruby-forum.com/topic/329485) and
decided that it wasn't worth it.

If you need the methods to be callable on Strings, it's easy to do so.
Also, if you want the functionality to handle Unicode characters,
doing it in pure ruby, using regular expressions, is much easier.

Regards,
Ammar
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top