rb_funcall

M

Mido Peace

Hi ,

we know that rb_funcall , is used to call some Ruby Methods from the C
code ,
actualy , This is what I tried , but in my case , it doesnt seem to work

my case is , that I should call a Ruby Method from a Ruby Class that
inherite from another Class.

with a Simple Ruby Class

class MyClass {
def initialize()
puts "bla bla bla"
end
end

rb_funcall3(rb_const_get(rb_cObject, rb_intern("MyClass")),
rb_intern("new"), 0, 0); // Works Good !!

But If I have

class MyClass < AnotherClass

def intialize ()
super()
puts "alb alb alb"
end
end


the rb_funcall Stucks !!
ruby: allocator undefined for MyClass (TypeError)

Can SomeOne Help ??

Thx ;)
 
M

Mido Peace

Oups .. It's Ok !!
I was Just inheritin' from The Thread Class and I forgot To initialize
the SuperClass .. So ./Clear
;)
 

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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top