-
Original patch (no longer around) patching the inconsistency wasn’t deemed an API change not a bug in the lighthouse ticket and rejected.
-
Depending on oniguruma regexp removes a bunch of code. Legacy 1.8 users would need oniguruma which apparently isn’t an option because of people unlucky enough to be dealing with JRuby.
-
I was too lazy to both keep the inconsistency and support named groups properly while providing backwards compatibility for 1.8 users so I gave up and we run a fork.
-
I’ve been waiting for a major version bump (hence the tweet) to be in the works to satisfy semantic versioning since whoever rejected the ticket doesn’t think it’s a bug.
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
#!/usr/bin/env ruby | |
require 'dm-core' | |
require 'pp' | |
DataMapper::Logger.new($stderr, :debug) | |
DataMapper.setup(:default, adapter: :postgres, database: 'dmbug') | |
class User | |
include DataMapper::Resource | |
property :id, Serial |
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
/** | |
* A simple preforking echo server in C. | |
* | |
* Building: | |
* | |
* $ gcc -Wall -o echo echo.c | |
* | |
* Usage: | |
* | |
* $ ./echo |
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 'minitest/unit' | |
require 'minitest/spec' | |
require 'ansi' | |
class MiniTest::Unit | |
include ANSI::Code | |
PADDING_SIZE = 4 | |
def run(args = []) |
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 'rack' | |
require 'thin' | |
module Rack | |
module Test | |
class App | |
# Attempt to run a Rack app server instance in the same process as the a | |
# 'work' block. Came about because you can't see an unsaved DB transaction | |
# inside the Rack app if it happens in another process. | |
# |
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
// Hacky prototype weak identity map extension. | |
#include <iostream> | |
#include <string> | |
#include <map> | |
#include <ruby/ruby.h> | |
#define ID_CONST_GET rb_intern("const_get") | |
#define CONST_GET(scope, constant) (rb_funcall(scope, ID_CONST_GET, 1, rb_str_new2(constant))) |
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 'benchmark' | |
require 'sexpistol' | |
require 'sxp' | |
require 'strscan' | |
class Lexer < StringScanner | |
def next_token | |
# Housekeeping. | |
skip /\s*/ |
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 'set' | |
#==== See | |
# * http://github.com/matpalm/resemblance | |
class String | |
module Shingles | |
N_GRAM_LENGTH = 3 | |
def shingles | |
@shingles ||= -> do |
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 'sinatra/base' | |
require 'rack/utils' | |
module Sinatra | |
class Base | |
module Map | |
def map path, klass | |
path = map_compile path | |
[:get, :put, :post, :delete, :head].each do |verb| | |
send(verb, path) do |
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
$ cd /usr/src | |
$ wget http://nginx.org/download/nginx-0.8.52.tar.gz | |
$ tar xzvf ./nginx-0.8.52.tar.gz | |
$ rm ./nginx-0.8.52.tar.gz | |
$ gem install s3sync capistrano capistrano-ext passenger --no-ri --no-rdoc | |
$ passenger-install-nginx-module | |
# Automatically download and install Nginx? 2. No: I want to customize my Nginx installation | |
# Where is your Nginx source code located?: /usr/src/nginx-0.8.52 | |
# Where do you want to install Nginx to?: /opt/nginx |