And I thought Ruby was crack…
Apparently it’s not crack that Ruby brings to the table. Witness:
def date=(val) [:year, :month, :day].each do |meth| raise ArgumentError unless val.responds_to?(meth) end @date = val end
Let’s see that one line again:
[:year, :month, :day].each do |meth|
Yes, you read it here first! Ruby, promoting meth use. The first one’s free!
From this RubyTalk post on Duck Typing.
What’s next? A method that puts out
??
Oh shit, that just brightened my day. 🙂
That was rather amusing.
Will you marry me?
Will you marry him?
Yes Yes, will you marry him??
well, i have to go with the crowd i guess…
will you marry us?
ok. all joking aside, im guessing this is real code from ruby library ? 😉
have to say thats almost as good as the comments found in win2k/xp code that was leaked 😛
‘puts out’ is definitely going into the code for my robot.
-Lateralus
Sorry guys, AhoysBoy is the real deal — I’m spoken for 😉 (Besides, marrying someone who proposed in a blog comment? Who wants to be a story on Reuter’s Oddly Enough?)
hilarious…
+subscribed! 🙂