thats_it 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/README.md +2 -0
- data/ext/thats_it/thats_it.c +22 -1
- data/ext/thats_it/thats_it_20500.h +2 -0
- data/ext/thats_it/thats_it_20600.h +2 -0
- data/lib/thats_it/version.rb +1 -1
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e568a9eb40ea7c11b2d7158cfa2e1f1383defcfab7f316b3ab3062c7ba51e7d4
|
4
|
+
data.tar.gz: d9834ded0bb6a34046139a940df50bee058dabb6e5afd202b76d5a8cd0baa7f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b397715151e041a35676ec031ce9b57ebf96848059f06cc9c666aae965fb8bc15ac9ed4c7fb38d29f0d595cadf00def873e19d825bc234f6788472ca8d3084e
|
7
|
+
data.tar.gz: 2ec78c399a9fa59b82a9b51e3f4eeb504906598d95c894a8977f0281bf93847db16f5dbe19064cb09be0ad79e9ef3ed391b7524999610b9469801809bf44c03b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.md
CHANGED
data/ext/thats_it/thats_it.c
CHANGED
@@ -106,9 +106,30 @@ static VALUE rb_setup_it_block_c_call() {
|
|
106
106
|
return Qnil;
|
107
107
|
}
|
108
108
|
|
109
|
+
static int env_local_p(VALUE *ep) {
|
110
|
+
VALUE flags = ep[VM_ENV_DATA_INDEX_FLAGS];
|
111
|
+
return flags & VM_ENV_FLAG_LOCAL ? 1 : 0;
|
112
|
+
}
|
113
|
+
|
114
|
+
static VALUE *prev_ep(VALUE *ep) {
|
115
|
+
return VM_TAGGED_PTR_REF(ep[VM_ENV_DATA_INDEX_SPECVAL], 0x03);
|
116
|
+
}
|
117
|
+
|
118
|
+
static VALUE *get_lep(VALUE *ep) {
|
119
|
+
while (!env_local_p(ep)) {
|
120
|
+
ep = prev_ep(ep);
|
121
|
+
}
|
122
|
+
return ep;
|
123
|
+
}
|
124
|
+
|
125
|
+
static VALUE get_block_handler(rb_control_frame_t *cfp) {
|
126
|
+
VALUE *ep = get_lep(cfp->ep);
|
127
|
+
return ep[VM_ENV_DATA_INDEX_SPECVAL];
|
128
|
+
}
|
129
|
+
|
109
130
|
static VALUE rb_setup_it_block_call() {
|
110
131
|
rb_control_frame_t *cfp = ruby_current_execution_context_ptr->cfp;
|
111
|
-
VALUE block_handler = (cfp + 2)
|
132
|
+
VALUE block_handler = get_block_handler(cfp + 2);
|
112
133
|
rb_iseq_t *iseq;
|
113
134
|
|
114
135
|
if (!block_handler) { return Qnil; }
|
data/lib/thats_it/version.rb
CHANGED
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|