Inspect a rational number
#!/usr/bin/env ruby require 'rational' require 'mathn' rat = Rational(25/100) # => 1/4 -- lowest terms rat.inspect # => "1/4"