This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/lib/ruby/1.8/rubygems/package/tar_input.rb:49:in `initialize': not in gzip format (Zlib::GzipFile::Error) | |
from /usr/lib/ruby/1.8/rubygems/package/tar_input.rb:49:in `new' | |
from /usr/lib/ruby/1.8/rubygems/package/tar_input.rb:49:in `initialize' | |
from /usr/lib/ruby/1.8/rubygems/package/tar_reader.rb:64:in `each' | |
from /usr/lib/ruby/1.8/rubygems/package/tar_reader.rb:55:in `loop' | |
from /usr/lib/ruby/1.8/rubygems/package/tar_reader.rb:55:in `each' | |
from /usr/lib/ruby/1.8/rubygems/package/tar_input.rb:32:in `initialize' | |
from /usr/lib/ruby/1.8/rubygems/package/tar_input.rb:17:in `new' | |
from /usr/lib/ruby/1.8/rubygems/package/tar_input.rb:17:in `open' | |
from /usr/lib/ruby/1.8/rubygems/package.rb:58:in `open' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
gem 'rails', '3.0.0.rc2' | |
# Bundle edge Rails instead: | |
#gem 'rails', :git => 'git://github.com/rails/rails.git', :branch => "3-0-stable" | |
gem 'mysql2' | |
gem 'awesome_print', :require => 'ap' | |
gem 'rails3-generators', "0.12.1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GameOfLife | |
attr_reader :width, :height, :cells | |
def initialize(width = 5, height = 5, seed = 5) | |
raise ArgumentError.new "Seed must be < than width x height!" if seed >= width * height | |
@width, @height = width, height | |
@cells = Array.new(width * height, 0) | |
@cells[rand(cells.size)] = 1 while cells.select{|c| c == 1}.size < seed | |
end |
NewerOlder