Created
April 26, 2013 00:37
-
-
Save jessereynolds/5464362 to your computer and use it in GitHub Desktop.
@johnf's code that reproduces the stack level too deep error on ubuntu 12.04.2 vm on esx comment out the [1].each do on line 42 and the problem goes away. I think defs foo and bar are not required to trigger the error.
This file contains hidden or 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 'eventmachine' | |
require 'em-synchrony' | |
require 'thin' | |
#require 'thin/version' | |
#module Thin | |
# def self.win? # Are we runing windows | |
# true | |
# end | |
#end | |
Myapp = lambda { |env| [200, {}, 'this is my app!'] } | |
module Flapjack | |
module Pikelet | |
def self.create | |
[Flapjack::Pikelet::Thin].each do |kl| | |
kl.create | |
end | |
end | |
class Thin | |
def self.create | |
self.new | |
end | |
def initialize | |
p caller.length | |
foo | |
end | |
def foo | |
bar | |
end | |
def oath | |
[1].each do | |
@server = ::Thin::Server.new('0.0.0.0', 3000, Myapp, :signals => false) | |
end | |
end | |
def bar | |
oath | |
end | |
end | |
end | |
class Coordinator | |
def start | |
EM.synchrony do | |
add_pikelets | |
puts "WIN" | |
exit | |
end | |
end | |
def add_pikelets | |
Flapjack::Pikelet.create | |
end | |
end | |
end | |
coordinator = Flapjack::Coordinator.new | |
coordinator.start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment