Here's all I came up with:
class Hello; def self.world!; [self, __callee__].join(' '); end; end
puts Hello.world!
Only works with Ruby 1.9 though...
On Feb 29, 7:06 ¨Âí¬ ÍáôôèåÍïóó ¼íáôôèå÷®í®®®Àçíáéì®ãïí¾ ÷òïôåº
> The three rules of Ruby Quiz 2:
> 1. ¨Âìåáóäï îïðïóô áîóïìõôéïîïò óðïéìåäéóãõóóéïî æïôèéó ñõéú õîôé´¸ èïõòèáöå ðáóóåä æòïí ôèôéíå ïî ôèéó íåóóáçå®
>
> 2. ¨Âõððïòô Òõâù Ñõéú âù óõâíéôôéîç éäåááó ïæôåáó ùïãáî¡ ¨Á ðåòíáîåîô¬ îå÷åâóéôéó éî ôè÷ïòëæïÒõâù Ñõéú ²® Õîôéôèåîðìåáóå öéóéôèôåíðïòáò÷åâóéôáô
>
> http://matthew.moss.googlepages.com/home>.
>
> 3. ¨Âîêïù>
> Suggestion: ¨Â ÛÑÕÉÚÝ éî ôèóõâêåãïæ åíáéìó áâïõôèðòïâìåèåìðåöåòùïîå ïî Òõâù Ôáìë æïììï÷ ôèäéóãõóóéïî ¨Âìåáóòåðìôï ôèïòéçéîáì ñõéú íåóóáçå¬ éæ ùïãáî®
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
> Hello, world?
>
> The first program any new programmer typically sees is one that > prints out "Hello, world!" to the console. This tends to be something > experienced programmers also see when learning a new language. The > first Hello World program was written in B [1] by Kernighan and > looked like this:
>
> ¨Âáéî¨ > ¨Âøôòî ᬠ⬠ã»
> ¨Âõôãèáò¨á©» ðõôãèáò¨â©ðõôãèáò¨ã©ðõôãèáò¨§¡ªî§©> ¨Â
>
> ¨Â §èåìì§> ¨Â §ï÷§> ¨Â §ïòìä§>
> Most programmers are probably more familiar with the typical C > implementation:
>
> ¨Âáéî¨> ¨Âòéîô樢Èåììï÷ïòìä¡Ü> ¨Â
>
> Ruby can present the same output very simply:
>
> ¨Âõô¢Èåììï÷ïòìä¡>
> But that's too simple... I mean, really... *anyone* can print a > simple string to standard output. Can't we get more interesting? > Hmmm, how about:
>
> ¨Âõôóðòéîô樢¥ó¬ ¥ó¡¢¢Èåìì ¢÷ïòì䢩
>
> Eh, that looks too much like C. Maybe...
>
> ¨Âõô¥÷¨Èåììï ÷ïòìä©®êïé¬ ¢© ¢¡>
> Yeah, that's definitely looking Ruby-ish.
>
> Your task this week is to print "Hello, world!" to standard output > using Ruby in atypical fashion. Some guildlines:
>
> - DO submit multiple variants in your submission, but we don't need > 100 variants from everyone. Try to limit yourself to your best dozen.
> - DO keep things reasonably simple. I would expect many solutions to > be one- or two-liners, some solutions to involve classes and > functions, and a variety in-between. But we're looking for Ruby-isms, > not volume of code, so don't write pages upon pages of code just to > print "Hello, world!"
> - DON'T obfuscate unnecessarily. We're looking for interesting Ruby > tricks, not utter confusion. A little obfuscation is okay, but a lot > is to be avoided.
> - DON'T send me my own examples from above. I already did them. Do > other stuff. It *is* okay if your solution is similar to mine, > provided you make some interesting modifications.
>
> [1]http://cm.bell-labs.com/cm/cs/who/dmr/btut.html