Hacker News new | ask | show | jobs
by bemurphy 4903 days ago
Minor correction (mostly because, I think the code is kinda interesting), Sinatra does something close to this. It actually uses the __END__ tag for its inline templates, but then internally it splits the file itself in two and then parses the latter portion:

https://github.com/sinatra/sinatra/blob/master/lib/sinatra/b...

I suspect the reason it does so is for the point the author of the article makes briefly: "And it only exists for the first ruby file to be invoked by the interpreter."