# Identification of VALUE recv

**URL:** <https://www.ruby-forum.com/t/identification-of-value-recv/121144>\
**Category:** Ruby\
**Created:** [November 24, 2007, 3:34pm UTC](https://www.ruby-forum.com/t/identification-of-value-recv/121144 "2007-11-24T15:34:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [November 24, 2007, 3:34pm UTC](https://www.ruby-forum.com/t/identification-of-value-recv/121144/1 "2007-11-24T15:34:05Z")

</div>

hey  
how is it possible to get the value(s) of the variable receiver in  
rb\_funcall?

Function:  
VALUE  
rb\_funcall(VALUE recv, ID mid, int n, …)

is there something like: StringValueCStr(recv) ?

the thing is, I want to know if a function x was called by rb\_funcall.  
therefor I want to see if the value of the revc is something like “x”

Further example:

class X  
def hi()  
p “hello”  
end  
end  
ix = X.new  
ix.hi # rb\_funcall is invoked

so the recv shall be hi() , which should be the value of recv or??

thank you

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [November 25, 2007, 7:35am UTC](https://www.ruby-forum.com/t/identification-of-value-recv/121144/2 "2007-11-25T07:35:50Z")

</div>

On Nov 24, 2007, at 06:33 , [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> so the recv shall be hi() , which should be the value of recv or??  
> no, recv is the VALUE for ix. mid is the id for :hi, n will be 0. It  
> would be roughly equivalent to :

rb\_funcall(ix, rb\_intern(“hi”), 0);

What I _think_ you’re asking is “what is the name of the reciever for  
this rb\_funcall” and there isn’t one.
