View struct_dsl.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 'rspec' | |
module StructDsl | |
def with_attributes(*args) | |
include Enumerable | |
args.map!(&:to_sym) | |
args.freeze | |
args.each { |p| attr_accessor p } |
View example.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
# @ruby2cpp: std | |
class Hello | |
# @ruby2cpp: annotate(String -> void) | |
def initialize(greeting) | |
# @ruby2cpp: annotate(String) | |
@greeting = greeting | |
end | |
# @ruby2cpp: annotate(String -> void) |
View rspec.log
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
1) RSpec::Expectations behaves like a library that issues no warnings when loaded issues no warnings when the spec files are loaded | |
Failure/Error: expect(stderr).to eq("") | |
expected: "" | |
got: "/Users/waterlink/.rvm/gems/ruby-2.2.0@global/gems/bundler-1.7.9/lib/bundler/source/rubygems.rb:191: warning: shadowing outer local variable - spec\n" | |
(compared using ==) | |
Diff: | |
@@ -1 +1,2 @@ |
View matcher_wrapper.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
class MatcherWrapper | |
def initialize(matcher) | |
@matcher = matcher | |
end | |
def diffable? | |
with_default(false) { @matcher.diffable? } | |
end | |
def description |
View x.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
# Classical defensive programming | |
def do_something_useful(active_user) | |
return unless active_user.last_action_date < 2.weeks.ago | |
# do something useful with active user | |
end | |
# ---- | |
# With contracts: | |
Contract ActiveUser => Any |
View log.txt
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
; ModuleID = 'Hash((Int:Class | Float:Class), (MySQL::Types::Integer:Class | MySQL::Types::Float:Class))' | |
%String = type { i32, i32, i32, i8 } | |
%"Array(Int32)" = type { i32, i32, i32, i32* } | |
%"Hash((Int:Class | Float:Class), (MySQL::Types::Integer:Class | MySQL::Types::Float:Class))" = type { i32, i32, %"Hash(K, V)::Entry((Int:Class | Float:Class), (MySQL::Types::Integer:Class | MySQL::Types::Float:Class))"**, i32, i32, i1, %"Hash(K, V)::Entry((Int:Class | Float:Class), (MySQL::Types::Integer:Class | MySQL::Types::Float:Class))"*, %"Hash(K, V)::Entry((Int:Class | Float:Class), (MySQL::Types::Integer:Class | MySQL::Types::Float:Class))"* } | |
%"Hash(K, V)::Entry((Int:Class | Float:Class), (MySQL::Types::Integer:Class | MySQL::Types::Float:Class))" = type { i32, %"(Int:Class | Float:Class)", %"(MySQL::Types::Integer:Class | MySQL::Types::Float:Class)", %"Hash(K, V)::Entry((Int:Class | Float:Class), (MySQL::Types::Integer:Class | MySQL::Types::Float:Class))"*, %"Hash(K, V)::Entry((Int:Class | Float:Class), (MySQL:: |
View x.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
class DatatypeBase | |
def initialize(blk) | |
@blk = blk | |
end | |
def _resolve! | |
@raw_contract = instance_eval(&@blk) | |
end | |
def Rec(name, &blk) |
View error.log
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
PUT https://api.travis-ci.org/hooks/4362171 | |
generate-cr:1 XMLHttpRequest cannot load https://api.travis-ci.org/hooks/4362171. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://travis-ci.org' is therefore not allowed access. The response had HTTP status code 500. | |
undefined | |
vendor-203bc1bf399e89b6815a49be7adde6a7.js:10 undefinedvendor-203bc1bf399e89b6815a49be7adde6a7.js:10 c.onerrorDefaultvendor-203bc1bf399e89b6815a49be7adde6a7.js:15 e.default.triggervendor-203bc1bf399e89b6815a49be7adde6a7.js:15 h._onerrorvendor-203bc1bf399e89b6815a49be7adde6a7.js:14 dvendor-203bc1bf399e89b6815a49be7adde6a7.js:10 (anonymous function)vendor-203bc1bf399e89b6815a49be7adde6a7.js:4 r.invokevendor-203bc1bf399e89b6815a49be7adde6a7.js:4 r.flushvendor-203bc1bf399e89b6815a49be7adde6a7.js:4 n.flushvendor-203bc1bf399e89b6815a49be7adde6a7.js:4 o.endvendor-203bc1bf399e89b6815a49be7adde6a7.js:4 o.runvendor-203bc1bf399e89b6815a49be7adde6a7.js:8 uvendor-203bc1bf399e89b6815a49be7adde6a7.js:16 a.erro |
View example.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
class MyStandardError < StandardError; end | |
module Kernel | |
alias_method :__raise__, :raise | |
def raise(*args) | |
return __raise__(MyStandardError) if args.empty? | |
__raise__(*args) | |
end | |
end |
View log.txt
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
➜ crystal git:(add_be_including_expectation) ✗ make doc | |
./bin/crystal doc docs/main.cr | |
Using compiled compiler at .build/crystal | |
Nil assertion failed | |
*Exception#initialize<Exception, String, Nil>:Array(String) +21 [61463232] | |
*Exception::new<String>:Exception +125 [61463232] | |
*raise<String>:NoReturn +6 [61463232] | |
*Nil#!<Nil>:Bool +0 [61463232] | |
*Crystal::Doc::Generator#compute_repository<Crystal::Doc::Generator>:Array(String)? +534 [61463232] | |
*Crystal::Doc::Generator#initialize<Crystal::Doc::Generator, Crystal::Program, Array(String), String>:Array(String)? +131 [61463232] |