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
#!/bin/bash -eux | |
set -o pipefail | |
org=$1 | |
repo=$2 | |
branch=$3 | |
get_status() { | |
curl -fs --retry 3 -X GET -u ${CIRCLE_TOKEN}: \ | |
--url "https://circleci.com/api/v2/pipeline/$1/workflow" |
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
diff --git a/struct.c b/struct.c | |
index ceb025ff83..6fc489e3a2 100644 | |
--- a/struct.c | |
+++ b/struct.c | |
@@ -1401,6 +1401,8 @@ InitVM_Struct(void) | |
rb_undef_alloc_func(rb_cStruct); | |
rb_define_singleton_method(rb_cStruct, "new", rb_struct_s_def, -1); | |
+ rb_define_singleton_method(rb_cStruct, "keyword_init?", rb_struct_s_keyword_init, 0); | |
+ |
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 'rack' | |
require 'rack/lobster' | |
class Streaming | |
class Stream | |
def each | |
%w[a b c].each do |e| | |
puts "Stream#each with #{e}" | |
sleep 1 | |
yield e |
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
diff --git a/ext/readline/readline.c b/ext/readline/readline.c | |
index 3380720f47..744fadde92 100644 | |
--- a/ext/readline/readline.c | |
+++ b/ext/readline/readline.c | |
@@ -1959,6 +1959,8 @@ Init_readline(void) | |
mReadline = rb_define_module("Readline"); | |
rb_define_module_function(mReadline, "readline", | |
readline_readline, -1); | |
+ rb_define_module_function(mReadline, "readmultiline", | |
+ readline_readline, -1); |
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 'logger' | |
logger1 = Logger.new('/tmp/logger/1.log') | |
logger1.level = Logger::Severity::DEBUG | |
logger2 = logger1.dup | |
logger2.level = Logger::Severity::INFO | |
logger1.info('1 info') | |
logger2.info('2 info') | |
logger1.debug('1 debug') |
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
# ref: http://blog.mirakui.com/entry/2012/04/03/slow-middleware | |
module RackMiddlewareBenchmarker | |
module Benchmarker | |
def call(env) | |
result = nil | |
ms = Benchmark.ms { result = super } | |
puts "MIDDLEWARE END #{self.class.to_s} (#{ms.to_i}ms)" | |
result | |
end | |
end |
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
diff --git a/iseq.c b/iseq.c | |
index 997dd7f1f7..be9efb9aad 100644 | |
--- a/iseq.c | |
+++ b/iseq.c | |
@@ -989,11 +989,8 @@ static const rb_data_type_t iseqw_data_type = { | |
static VALUE | |
iseqw_new(const rb_iseq_t *iseq) | |
{ | |
- union { const rb_iseq_t *in; void *out; } deconst; | |
VALUE obj; |
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
3s 3sec | |
4s 4sec |
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
$ bundle exec ruby exec.rb | |
== disasm: #<ISeq:<compiled>@src.rb>==================================== | |
0000 trace 1 ( 1) | |
0002 putself | |
0003 putobject 10 | |
0005 putobject 2 | |
0007 opt_plus <callinfo!mid:+, argc:1, ARGS_SIMPLE>, <callcache> | |
0010 opt_send_without_block <callinfo!mid:puts, argc:1, FCALL|ARGS_SIMPLE>, <callcache> | |
0013 pop | |
0014 trace 1 ( 2) |
NewerOlder