How to create a private method in Ruby C?

Discussion in 'Ruby' started by Iñaki Baz Castillo, Feb 6, 2011.

  1. Hi, is there any shortcut to invoke "private :method_name" in a Ruby C
    extension? or must I use rb_funcall()?

    Thanks a lot.

    --=20
    I=C3=B1aki Baz Castillo
    <>
    Iñaki Baz Castillo, Feb 6, 2011
    #1
    1. Advertising

  2. 2011/2/7 I=C3=B1aki Baz Castillo <>:
    > Hi, is there any shortcut to invoke "private :method_name" in a Ruby C
    > extension? or must I use rb_funcall()?


    Ops, very easy:

    rb_define_private_method( )

    :)


    --=20
    I=C3=B1aki Baz Castillo
    <>
    Iñaki Baz Castillo, Feb 7, 2011
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. qazmlp
    Replies:
    19
    Views:
    776
    Daniel T.
    Feb 4, 2004
  2. DaveLessnau
    Replies:
    3
    Views:
    413
    Howard
    May 16, 2005
  3. Jeremy Bowers
    Replies:
    3
    Views:
    501
    Steven Bethard
    Jan 24, 2005
  4. Daniel Finnie
    Replies:
    3
    Views:
    174
    Logan Capaldo
    Dec 16, 2006
  5. Replies:
    4
    Views:
    128
Loading...

Share This Page