Forum: Ruby How can we use pointer concept in Ruby?

1eb28f3c91b0a7b8bfb1a72cfa8befaa?d=identicon&s=25 Jaimin Pandya (jaimin)
on 2014-04-30 21:40
How can we use pointer concept (which we are using in C programming) in
Ruby?
B078cb4f4fb473c7a54d1fc36d10c70e?d=identicon&s=25 Regis d'Aubarede (raubarede)
on 2014-04-30 22:25
Jaimin Pandya wrote in post #1144580:
> How can we use pointer concept (which we are using in C programming) in
> Ruby?

all object are pointer (handle) on an object instance.
and method, class, module, thread... are ruby Object
So writing ruby code is  using pointers ...

But
* you can't use algebra on pointer : no addition/substraction
* you can't get the real memory address of an object

So  ruby interpreter implementation is free to use his self addressing
mechanism, which can not to be memory pointer (as in JVM/JRuby).
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.