mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fixed visibility at method definition
There was a problem with visibility state from proc that straddles a fiber or is independent. Therefore, it has been changed to give priority to env objects, if any. Also, added "separate module" flag to block traversal to a higher level env object. Note that the "separate module" flag is now set when calling blocks with the `mrb_yield_with_class()` function. fixed https://github.com/mruby/mruby/issues/6494
This commit is contained in:
+2
-1
@@ -176,7 +176,8 @@ typedef struct {
|
||||
uint8_t n:4; /* (15=*) c=n|nk<<4 */
|
||||
uint8_t nk:4; /* (15=*) */
|
||||
uint8_t cci; /* called from C function */
|
||||
uint8_t vis; /* visibility in the current scope */
|
||||
uint8_t vis; /* 5(ZERO):1(separate module):2(method visibility) */
|
||||
/* under 3-bit flags are copied to env, and after that, env takes precedence */
|
||||
mrb_sym mid;
|
||||
const struct RProc *proc;
|
||||
struct RProc *blk;
|
||||
|
||||
Reference in New Issue
Block a user