Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (26 sloc) 0.589 kb
require 'common'
test_check('range')
a = (1 .. 3)
test_ok(a.begin == 1)
test_ok(a.end == 3)
test_ok(a.exclude_end? == false)
test_ok(a.first == 1)
test_ok(a.last == 3)
a = (1 ... 3)
test_ok(a.begin == 1)
test_ok(a.end == 3)
test_ok(a.exclude_end? == true)
test_ok(a.first == 1)
test_ok(a.last == 3)
a = Range.new(1, 3)
test_ok(a.begin == 1)
test_ok(a.end == 3)
test_ok(a.exclude_end? == false)
test_ok(a.first == 1)
test_ok(a.last == 3)
a = Range.new(1, 3, true)
test_ok(a.begin == 1)
test_ok(a.end == 3)
test_ok(a.exclude_end? == true)
test_ok(a.first == 1)
test_ok(a.last == 3)
Jump to Line
Something went wrong with that request. Please try again.