Last active
February 9, 2017 16:37
-
-
Save lyda/ce3d5f238f61ffc1badfa59dc48743d1 to your computer and use it in GitHub Desktop.
Get mmap working with ruby 2.3.1
This file contains 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 "https://rubygems.org" | |
gem 'mmap', git: 'https://github.com/lyda/mmap.git', :branch => 'non-global-version' |
This file contains 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
#! /bin/sh | |
test -f Gemfile.lock && rm Gemfile.lock | |
bundle install | |
bundle exec ruby test.rb |
This file contains 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
require 'mmap' | |
mmap = Mmap.new(__FILE__) | |
mmap.advise(Mmap::MADV_SEQUENTIAL) | |
mmap.each do |line| | |
puts line | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment