diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-27 02:55:16 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-27 02:55:16 +0000 |
| commit | ddda108ecce743ed9e1128d21518d015304dc67c (patch) | |
| tree | 53d0c8dad357b9dac6635bbbe61bca6593b029a9 /test/test_mathn.rb | |
| parent | 047368022efd67e91c367f91f5c6d3050d7d7336 (diff) | |
merges r25067 from trunk into ruby_1_9_1 and added a test for it.
--
* lib/mathn.rb (Bignum#**): Fixed bignum**fixnum that was broken when requiring lib/mathn
[ruby-core:25740]
--
* test/test_mathn.rb (TestMathn): new test case.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@25949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_mathn.rb')
| -rw-r--r-- | test/test_mathn.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_mathn.rb b/test/test_mathn.rb new file mode 100644 index 000000000..d0bf03760 --- /dev/null +++ b/test/test_mathn.rb @@ -0,0 +1,10 @@ +require 'test/unit' +require_relative 'ruby/envutil' + +# mathn redefines too much. It must be isolated to child processes. +class TestMathn < Test::Unit::TestCase + def test_power + assert_in_out_err ['-r', 'mathn', '-e', '1**2'], [], [], [], '[ruby-core:25740]' + assert_in_out_err ['-r', 'mathn', '-e', '(1<<126)**2'], [], [], [], '[ruby-core:25740]' + end +end |
