I hereby claim:
- I am kschiess on github.
- I am kschiess (https://keybase.io/kschiess) on keybase.
- I have a public key whose fingerprint is 410C D966 C2FE D140 1ADA 77E9 8C67 10A3 D7A0 791E
To claim this, I am signing this object:
#![deny(warnings)] | |
extern crate futures; | |
extern crate hyper; | |
extern crate pretty_env_logger; | |
extern crate serde_json; | |
use futures::{future, Future}; | |
use hyper::{Body, Client, Request, Response, Server}; | |
use hyper::client::HttpConnector; |
I hereby claim:
To claim this, I am signing this object:
$:.unshift 'PATHTOINTERNALSCODE' | |
require 'string_internals.bundle' | |
def scan_for title, s, indent=0 | |
GC.start | |
times = 0 | |
content = '' | |
ObjectSpace.each_object(String) do |str| | |
if str == s | |
times += 1 |
class Foo | |
def to_s | |
1 | |
end | |
# Just to make sure ;) | |
def inspect | |
'a foo' | |
end | |
end |
require 'rspec' | |
require 'dm-transactions' | |
RSpec.configure do |rspec| | |
rspec.mock_with :flexmock | |
end | |
describe 'transaction block behaviour' do | |
let(:t) { DataMapper::Transaction.new() } |
diff --git a/lib/rip/compiler/parser.rb b/lib/rip/compiler/parser.rb | |
index eb60b43..2416e3d 100644 | |
--- a/lib/rip/compiler/parser.rb | |
+++ b/lib/rip/compiler/parser.rb | |
@@ -261,11 +261,13 @@ module Rip::Compiler | |
rule(:heredoc_start) { angled_open.repeat(2, 2) >> heredoc_label >> line_break } | |
rule(:heredoc_label) { match['A-Z_'].repeat(1).capture(:heredoc_label) } | |
- rule(:heredoc_content) { (heredoc_end.absent? >> heredoc_content_any >> (line_break.absent? >> heredoc_content_any).repeat >> heredoc_content_any).repeat(1) } | |
+ # rule(:heredoc_content) { (heredoc_end.absent? >> heredoc_content_any >> (line_break.absent? >> heredoc_content_any).repeat >> heredoc_content_any).repeat(1) } |
require 'strscan' | |
# Inspired by | |
# http://eli.thegreenplace.net/2012/08/02/parsing-expressions-by-precedence-climbing/ | |
# A succinct implementation of precedence climbing in Ruby | |
operations = {} | |
%w(+ -).each { |c| operations[c] = [:left, 1] } |
class Foo | |
def respond_to?(sym) | |
if sym == :foo | |
return true | |
else | |
super | |
end | |
end | |
end | |
class Bar |
# Encoding: UTF-8 | |
require 'fiber' | |
HEADER = 0x61 | |
FOOTER = 0x62 | |
DLE = 0xAB | |
def after_dle(x) | |
x |
require 'parslet' | |
include Parslet | |
input = %w(a aa b) | |
class El < Parslet::Atoms::Base | |
def initialize(pattern) | |
@pattern = pattern | |
super() | |
end |