def rint(o)
if ((first >= o.first) &&
((first < o.last) || (!o.exclude_end? && (first == o.last))))
if last < o.last
AwesomeRange.new(first, last, exclude_end?)
elsif last > o.last
AwesomeRange.new(first, o.last, o.exclude_end?)
else
AwesomeRange.new(first, last, exclude_end? || o.exclude_end?)
end
elsif (((last > o.first) || (!exclude_end? && (last == o.first))) && ((last < o.last) || (!o.exclude_end? && (last == o.last))))
AwesomeRange.new([first, o.first].max, last, exclude_end?)
elsif rss?(o)
o
else
nil
end
end