summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-30 11:35:04 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-30 11:35:04 +0000
commit00d0d6eab02a7102d7e720b4cfd105210a27a85d (patch)
treee23064818954c0b0bb750155bbe7b3d85430adfe /test/ruby
parent5700a8601ae53096334272cda3a072980c44c78f (diff)
* test/ruby/test_rand.rb (test_random_bytes): fold mysteriously
long line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_rand.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/ruby/test_rand.rb b/test/ruby/test_rand.rb
index 9ba38f399c..67b6df8562 100644
--- a/test/ruby/test_rand.rb
+++ b/test/ruby/test_rand.rb
@@ -340,10 +340,14 @@ END
end
def test_random_bytes
- r = Random.new(0)
+ assert_random_bytes(Random.new(0))
+ end
+
+ def assert_random_bytes(r)
assert_equal("", r.bytes(0))
assert_equal("\xAC".force_encoding("ASCII-8BIT"), r.bytes(1))
- assert_equal("/\xAA\xC4\x97u\xA6\x16\xB7\xC0\xCC".force_encoding("ASCII-8BIT"), r.bytes(10))
+ assert_equal("/\xAA\xC4\x97u\xA6\x16\xB7\xC0\xCC".force_encoding("ASCII-8BIT"),
+ r.bytes(10))
end
def test_random_range