logoalt Hacker News

everforwardtoday at 3:34 PM0 repliesview on HN

I think you could work around send(). Not a Ruby person, but in most languages you could store functions in a hashmap, and write an implementation of send that does a lookup and invokes the method (passing the instance pointer through if need be).

Won’t work with actual class methods, but if you know ahead of time all the functions it will call are dynamic then it’s not a big deal.