Great coats. Ryan Davis thinks he’s son-shi. And I’m practically buying it, what with the cauldron’s fill of meta libs he’s brewing. And all that reading from parse tree tea leaves over on Polishing:
So… drbrain comes up to me in an IM and says flgr is saying it’d be really cool if you could ask a method for its source. I know what he is doing, baiting me like that, but I play along anyways to see what the outcome is like. drbrain and I talked about it and thought it’d be really cool if our ruby2c system added a to_c method to the Method class.
But the question came up… can we do this to display ruby code? The answer is yes, and it only took me about 30 minutes to get the proof of concept up and running.
And he’s got all the wrapper code there. All the limits of ParseTree and RubyToC apply, still my sweet tooth is literally pulsing from all the red licorice.