Skip to content

Instantly share code, notes, and snippets.

@ox
Created October 11, 2012 15:36
Show Gist options
  • Save ox/3873264 to your computer and use it in GitHub Desktop.
Save ox/3873264 to your computer and use it in GitHub Desktop.
Find primes, but using the ruby stdlib
require 'prime'
100.times { |n| puts n if n.prime? }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment