My contention is that Ruby developers are more likely to use Object#is_a?, Object#respond_to?, and Class#=== in their code than Java developers are to use "instanceof". Here is some anecdotal evidence supporting this contention. It's not easy to compare the two for a number of different reasons:
- Java projects tend to have a lot more code
- It's hard to decide which projects are comparable to others
- It's hard to search for uses of Class#===, which is most often used in case statements.
Nonetheless, here are some numbers which probably mean nothing.
- SLOC: 385182
- Lines containing 'instanceof': 1400
- Proportionally: 0.39%
- SLOC: 138628
- Lines containing 'is_a?/respond_to?': 936
- Proportionally: 0.68%