Ruby Meta-programming

15 views
Skip to first unread message

mlimotte

unread,
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.

Marc

evgeny vovchenko

unread,
Dec 1, 2009, 11:51:28 AM12/1/09
to rhom...@googlegroups.com
All meta-programming features except of eval(interpreting ruby code) should
work
--

You received this message because you are subscribed to the Google Groups
"rhomobile" group.
To post to this group, send email to rhom...@googlegroups.com.
To unsubscribe from this group, send email to
rhomobile+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rhomobile?hl=en.


evgeny vovchenko

unread,
Dec 1, 2009, 12:13:14 PM12/1/09
to rhom...@googlegroups.com
And you can also eval block(since block is already compiled)

-----Original Message-----
From: mlimotte [mailto:msli...@gmail.com]
Sent: Tuesday, December 01, 2009 6:25 PM
To: rhomobile
Subject: [rhomobile] Ruby Meta-programming


Reply all
Reply to author
Forward
0 new messages