Skip to content

Commit

Permalink
Random is a 1.9ism :(
Browse files Browse the repository at this point in the history
  • Loading branch information
tarcieri committed Feb 14, 2012
1 parent 5536864 commit e2ab405
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file modified lib/iobuffer_ext.bundle
Binary file not shown.
8 changes: 4 additions & 4 deletions spec/buffer_spec.rb
Expand Up @@ -172,13 +172,13 @@
end

it "Can handle lots of data" do
(rp, wp) = File.pipe
rng = Random.new(1)
rp, wp = File.pipe
srand 1

total = 0
100.times do
chunk_size = rng.rand(2048) #We don't actually know the pipe buffer size!
if rng.rand > 0.5
chunk_size = rand(2048) #We don't actually know the pipe buffer size!
if rand > 0.5
wp.write("x" * chunk_size)
@buffer.read_from(rp)
else
Expand Down

2 comments on commit e2ab405

@loganb
Copy link
Contributor

@loganb loganb commented on e2ab405 Feb 19, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that!

@tarcieri
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's all good :)

Please sign in to comment.