Sha256: 61537fd4ed2805ea080b0e9d7aa8d53713c5eb3b3aaaadc9a070e2fb8326b83c

Contents?: true

Size: 431 Bytes

Versions: 3

Compression:

Stored size: 431 Bytes

Contents

# Monkey patching some methods into Cool.io to make it more testable
module Coolio
  class Loop
    # Cool.io provides no means to change the default loop which makes sense in
    # most situations, but not ours.
    def self.default_loop=(event_loop)
      if RUBY_VERSION >= "1.9.0"
        Thread.current.instance_variable_set :@_coolio_loop, event_loop
      else
        @@_coolio_loop = event_loop
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
evented-spec-1.0.0.beta1 lib/evented-spec/ext/coolio.rb
evented-spec-0.9.0 lib/evented-spec/ext/coolio.rb
evented-spec-0.4.1 lib/evented-spec/ext/coolio.rb