Fun Ruby trick: Module#< can be used to see if something is a subclass of something else: Object < BasicObject # => true
-
-
@steveklabnik@bascule I’m just going to keep saying obvious things. The sky is often blue. -
-
@steveklabnik@bascule framework authors would probably find it useful if they’re using inheritance (ActiveRecord::Base, for instance) -
-
@steveklabnik@bascule ah, we’ve come full circle then :)
End of conversation
New conversation -
-
@bascule@steveklabnik but File.is_a? IO #=> false (it's a Class) & File < IO -
@judsonlester@steveklabnik that's fine, just don't do file.class < IO ;) -
@bascule@steveklabnik What about IO === file ? :p -
@judsonlester@steveklabnik I only like that behavior when used invisibly via case/when. IO === file is confusing as fuck
End of conversation
New conversation -
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.