I think Ruby is interpreted to C. If so, how can I use the concept of pointers and other features that are parts of C environment?
How can we utilize the power of C with the simplicity of Ruby?
I think Ruby is interpreted to C. If so, how can I use the
Share
In Ruby, (almost) every variable is in fact a reference/pointer to an object, e.g.
will give
[0, 1, 23, 42]becauseaandbare pointing to the same object.So in fact, you are using pointers all the time.
If you want to do pointer arithmetic as in C, this is not possible with Ruby.