[C ext to Ruby] how to produce from C, a ruby symbol ???

U

unbewust

i'd like to use ruby symbols from C , i've found ID2SYM and SYM2ID but
nothing like STR2SYM in ruby.h

i'd like to produce those ruby symbols :

:verbose and : noop


from C side...


i'm able to retrieve, from C side, the value of a key provided i know,
in advance the key and the key is a string...


Yvon
 
T

Tim Pease

i'd like to use ruby symbols from C , i've found ID2SYM and SYM2ID but
nothing like STR2SYM in ruby.h

i'd like to produce those ruby symbols :

:verbose and : noop

ID2SYM( rb_intern( "verbose" ) );
ID2SYM( rb_intern( "noop" ) );

Blessings,
TwP
 

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,962
Messages
2,570,134
Members
46,692
Latest member
JenniferTi

Latest Threads

Top