Ruby Meta-programming

Skip to first unread message


Dec 1, 2009, 10:24:58 AM12/1/09
to rhomobile

I saw this in question 7 of the FAQ:

> ... Code is precompiled into Ruby 1.9 bytecode for the iPhone. You can’t do metaprogramming or download Ruby code on the fly.

I understand that "eval" is not supported, and of course downloading
code, but are all meta-programming features prohibited? What about
the use of method_missing, and the ability to add method definitions
at runtime to an instance of a Class?

I've tried these out and they do work in the IPhone simulator, but I
haven't tried them on an actual iPhone. Until now, I've been assuming
(hoping) that if it works in the Simulator. it will work on the
device. Is this reasonably true?

I'd appreciate some clarification.


evgeny vovchenko

Dec 1, 2009, 11:51:28 AM12/1/09
All meta-programming features except of eval(interpreting ruby code) should

You received this message because you are subscribed to the Google Groups
"rhomobile" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

evgeny vovchenko

Dec 1, 2009, 12:13:14 PM12/1/09
And you can also eval block(since block is already compiled)

-----Original Message-----
From: mlimotte []
Sent: Tuesday, December 01, 2009 6:25 PM
To: rhomobile
Subject: [rhomobile] Ruby Meta-programming

Reply all
Reply to author
0 new messages