diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-13 14:04:21 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-13 14:04:21 +0000 |
commit | 85512bdbde6f23334b4c20201b53539217518770 (patch) | |
tree | 94cd2bfef5b24e07391b26f99b58e8f179751a9c /test/ruby | |
parent | a2a6c98e51ee9e5d3525aef210ad0162c5008312 (diff) | |
download | ruby-85512bdbde6f23334b4c20201b53539217518770.tar.gz |
test_comparable.rb: fix clamp test
* test/ruby/test_comparable.rb (TestComparable#test_clamp): fix
test. the result which is not clamped should be the receiver.
[Feature #10594]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_comparable.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_comparable.rb b/test/ruby/test_comparable.rb index f35719a9cb..94c05d5f91 100644 --- a/test/ruby/test_comparable.rb +++ b/test/ruby/test_comparable.rb @@ -80,10 +80,10 @@ class TestComparable < Test::Unit::TestCase cmp->(x) do 0 <=> x end assert_equal(1, @o.clamp(1, 2)) assert_equal(-1, @o.clamp(-2, -1)) - assert_equal(0, @o.clamp(-1, 3)) + assert_equal(@o, @o.clamp(-1, 3)) assert_equal(1, @o.clamp(1, 1)) - assert_equal(0, @o.clamp(0, 0)) + assert_equal(@o, @o.clamp(0, 0)) assert_raise_with_message(ArgumentError, 'min argument must be smaller than max argument') { @o.clamp(2, 1) |