blob: 96644da69c52346700d164578939ec71b67691ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
##
# Numeric(Ext) Test
assert('Integer#chr') do
assert_equal("A", 65.chr)
assert_equal("B", 0x42.chr)
# multibyte encoding (not support yet)
assert_raise(RangeError) { 256.chr }
end
assert('Integer#div') do
assert_equal 52, 365.div(7)
end
assert('Float#div') do
assert_float 52, 365.2425.div(7)
end
|