diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-06-23 07:05:59 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-06-23 07:05:59 +0000 |
| commit | 2431451396d851174715edf98c00231581e294f2 (patch) | |
| tree | d6abf2514a01ce6f2ff5160cea2d132933af3973 /sample/test.rb | |
| parent | 623f789e46a571d4d18ba5a7ae5fd657e5d34a0f (diff) | |
| download | ruby-2431451396d851174715edf98c00231581e294f2.tar.gz ruby-2431451396d851174715edf98c00231581e294f2.tar.xz ruby-2431451396d851174715edf98c00231581e294f2.zip | |
2000-06-23
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/test.rb')
| -rw-r--r-- | sample/test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sample/test.rb b/sample/test.rb index 8f789fdd8..9da67f572 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -607,6 +607,17 @@ for i in 4000..4096 end ok($good) +b = 10**80 +a = b * 9 + 7 +ok(7 == a % b) +ok(7-b == a % (-b)) +ok(b-7 == (-a) % b) +ok(-7 ==(-a) % (-b)) +ok(7 ==a.remainder(b)) +ok(7 ==a.remainder(-b)) +ok(-7 == (-a).remainder(b)) +ok(-7 == (-a).remainder(-b)) + check "string & char" ok("abcd" == "abcd") |
