Fun Ruby trick: Module#< can be used to see if something is a subclass of something else: Object < BasicObject # => true
-
-
Replying to @steveklabnik
@steveklabnik is_a? is so much clearer though...2 replies 0 retweets 0 likes -
Replying to @bascule
@bascule@steveklabnik but File.is_a? IO #=> false (it's a Class) & File < IO1 reply 0 retweets 0 likes -
Replying to @judsonlester
@judsonlester@steveklabnik that's fine, just don't do file.class < IO ;)1 reply 0 retweets 0 likes -
Replying to @judsonlester
@judsonlester @steveklabnik I only like that behavior when used invisibly via case/when. IO === file is confusing as fuck
3:22 PM - 20 Oct 2012
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.