initialize @status = 200 @headers = {} @stream = StringIO.new end end def call(env) res = Response.new controller.response = res controller.index [res.status, res.headers, res.stream] end
EventSource('/control'); // if we get a reload command, reload the page source.addEventListener('reload', function(e) { window.location.reload(); }); }, 1); });
EventSource('/control'); // if we get a reload command, reload the page source.addEventListener('reload', function(e) { window.location.reload(); }); }, 1); });
EventSource('/control'); // if we get a reload command, reload the page source.addEventListener('reload', function(e) { window.location.reload(); }); }, 1); });
EventSource('/control'); // if we get a reload command, reload the page source.addEventListener('reload', function(e) { window.location.reload(); }); }, 1); });
{ |data| queue << data } begin while data = queue.pop begin io.write data, :event => 'measurement' rescue IOError queue.push nil io.close end end ensure BUS.delete_observer observer end end
* 3, DL::TYPE_VOIDP) RubyVM::InstructionSequence.class_eval do # This monkey patch allows us to load arbitrary byte code with # Ruby's VM define_singleton_method(:load) { |data, parent = nil, opt = nil| func.call(DL.dlwrap(data), parent, opt).to_value } end
* 3, DL::TYPE_VOIDP) RubyVM::InstructionSequence.class_eval do # This monkey patch allows us to load arbitrary byte code with # Ruby's VM define_singleton_method(:load) { |data, parent = nil, opt = nil| func.call(DL.dlwrap(data), parent, opt).to_value } end
true, false, nil, and so on. @j ΦϒδΣΫτ val ΛελοΫʹϓογϡ͢Δɻ i.e. Fixnum, true, false, nil, and so on. */ DEFINE_INSN putobject (VALUE val) () (VALUE val) { /* */ }
true, false, nil, and so on. @j ΦϒδΣΫτ val ΛελοΫʹϓογϡ͢Δɻ i.e. Fixnum, true, false, nil, and so on. */ DEFINE_INSN putobject (VALUE val) () (VALUE val) { /* */ } It does nothing.