Introduction to Spark Apr 15th, 2015 12:58 pm 1 2 3 4 5 class Fixnum def prime? ('1' * self) !~ /^1?$|^(11+?)\1+$/ end end