Skip to content

Commit

Permalink
Fix Random.new when passed a Complex w/non-zero imaginary part
Browse files Browse the repository at this point in the history
  • Loading branch information
jc00ke committed Jan 5, 2012
1 parent 44341f8 commit 219323c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions kernel/common/random19.rb
Expand Up @@ -49,8 +49,7 @@ def self.rand(limit=undefined)
def initialize(seed=undefined)
@randomizer = Rubinius::Randomizer.new
if !seed.equal?(undefined)
seed = Rubinius::Type.coerce_to seed, Integer, :to_int
@randomizer.swap_seed seed
@randomizer.swap_seed seed.to_int
end
end

Expand Down
1 change: 0 additions & 1 deletion spec/tags/19/ruby/core/random/new_tags.txt

This file was deleted.

0 comments on commit 219323c

Please sign in to comment.