The ruby type checker

Brianna M. Ren, John Toman, T. Stephen Strickland, Jeffrey S. Foster
2013 Proceedings of the 28th Annual ACM Symposium on Applied Computing - SAC '13  
We present the Ruby Type Checker (rtc), a tool that adds type checking to Ruby, an object-oriented, dynamic scripting language. Rtc is implemented as a Ruby library in which all type checking occurs at run time; thus it checks types later than a purely static system, but earlier than a traditional dynamic type system. Rtc supports type annotations on classes, methods, and objects and rtc provides a rich type language that includes union and intersection types, higherorder (block) types, and
more » ... metric polymorphism among other features. Rtc is designed so programmers can control exactly where type checking occurs: type-annotated objects serve as the "roots" of the type checking process, and unannotated objects are not type checked. We have applied rtc to several programs and found it to be easy to use and e↵ective at checking types.
doi:10.1145/2480362.2480655 dblp:conf/sac/RenTSF13 fatcat:ulylhna6qvdm3p45nbwnnzq4tq