#!/usr/bin/ruby

#
## https://rosettacode.org/wiki/Infinity
#

var a = 1.5/0;        # inf
say a.is_inf;         # true
say a.is_pos;         # true
 
var b = -1.5/0;       # -inf
say b.is_ninf;        # true
say b.is_neg;         # true
 
var inf = Inf
var ninf = -Inf;
say (inf == -ninf);   # true
