I hereby claim:
- I am floere on github.
- I am hanke (https://keybase.io/hanke) on keybase.
- I have a public key whose fingerprint is 275C 528B 9AF2 B800 1A03 B7A0 4FA6 A8F9 CF1C 1307
To claim this, I am signing this object:
/app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:760:in `block in purge_bundler_cache': undefined local variable or method `install_language_pack_gems' for #<LanguagePack::Rack:0x000000014692f8> (NameError) | |
from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument' | |
from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:40:in `yield_with_block_depth' | |
from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:17:in `block in instrument' | |
from /usr/local/lib/ruby/1.9.1/benchmark.rb:310:in `realtime' | |
from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in `instrument' | |
from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:43:in `instrument' | |
from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:39:in `instrument' | |
from /app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:756:in `purge_bundler_cache' | |
from /app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:722:in `block in load_bundler_cache' |
3534 /Users/hanke/temp/cocoapods/search.cocoapods.org/lib/pods.rb:55:OBJECT | |
3534 /Users/hanke/temp/cocoapods/search.cocoapods.org/lib/pods.rb:56:STRING | |
3534 /Users/hanke/temp/cocoapods/search.cocoapods.org/lib/pods.rb:57:HASH | |
3535 /Users/hanke/temp/cocoapods/search.cocoapods.org/lib/pods.rb:58:STRING | |
4358 /Users/hanke/.gem/ruby/2.1.0/gems/cocoapods-core-0.29.0/lib/cocoapods-core/specification.rb:280:OBJECT | |
4500 /Users/hanke/.gem/ruby/2.1.0/gems/cocoapods-core-0.29.0/lib/cocoapods-core/specification.rb:34:HASH | |
4500 /Users/hanke/.gem/ruby/2.1.0/gems/cocoapods-core-0.29.0/lib/cocoapods-core/specification.rb:35:ARRAY | |
4500 /Users/hanke/.gem/ruby/2.1.0/gems/cocoapods-core-0.29.0/lib/cocoapods-core/specification.rb:36:HASH | |
4500 /Users/hanke/.gem/ruby/2.1.0/gems/cocoapods-core-0.29.0/lib/cocoapods-core/specification.rb:38:STRING | |
5192 /Users/hanke/.gem/ruby/2.1.0/gems/cocoapods-core-0.29.0/lib/cocoapods-core/specification/dsl.rb:443:STRING |
# We repeatedly fill a hash. | |
# We use the same keyspace each time after the first time. | |
# | |
# My expectation was that the total memory used would not increase significantly after the first iteration. | |
# | |
h = {} | |
10.times do |i| | |
100000.times do |i| | |
h[i.to_s] = [1,2,3] | |
end |
chruby 1.9.3 | |
ruby hashmemtest1.rb | |
ruby hashmemtest2.rb | |
ruby hashmemtest3.rb | |
chruby 2.1.0 | |
ruby hashmemtest1.rb | |
ruby hashmemtest2.rb | |
ruby hashmemtest3.rb |
I hereby claim:
To claim this, I am signing this object:
require 'rubygems' | |
require 'activesupport' | |
class Object | |
# As popularized by Why: | |
# http://whytheluckystiff.net/articles/seeingMetaclassesClearly.html | |
# | |
def metaclass | |
class << self; return self; end |
require 'rubygems' | |
require 'minitest/unit' | |
require 'minitest/spec' | |
MiniTest::Unit.autorun | |
# This walks the given stub strings and sets up partial stub responder chains. | |
# | |
class StubBuilder | |
class Floppy | |
def method_missing(method, *args) | |
super unless args.length > 0 && method.to_s[-1..-1] == "=" | |
if args.first.is_a?(Proc) | |
(class << self; self; end).class_eval do | |
define_method(method.to_s[0..-2].to_sym, args.first) | |
end | |
else | |
(class << self; self; end).send(:attr_accessor, method.to_s[0...-1]) |
class LazyProxy | |
instance_methods.each do |method| | |
undef_method(method) if method !~ /^__/ | |
end | |
def initialize &lazy_proxy_block | |
@lazy_proxy_block = lazy_proxy_block | |
end | |
#; named lambda klass | |
#; in an environment with counter set to 0 | |
#; define an anonymous lambda which increases the counter by one | |
# | |
# (defun klass () | |
# (let ((counter 0)) | |
# (lambda () (incf counter)))) | |
;klass = lambda { | |
; counter = 0 |