Commit 5dc87f77 authored by dearblue's avatar dearblue

Fixed shift width for `MRB_ENV_SET_BIDX()`

ref c07f24cd and close #5035
parent bfd58a3f
......@@ -34,7 +34,7 @@ struct REnv {
#define MRB_ENV_HEAP_P(e) ((e)->flags & MRB_ENV_HEAPED)
#define MRB_ENV_ONSTACK_P(e) (((e)->flags & MRB_ENV_CLOSED) == 0)
#define MRB_ENV_BIDX(e) (((e)->flags >> 8) & 0xff)
#define MRB_ENV_SET_BIDX(e,idx) ((e)->flags = (((e)->flags & ~(0xff<<8))|((unsigned int)(idx) & 0xff)<<10))
#define MRB_ENV_SET_BIDX(e,idx) ((e)->flags = (((e)->flags & ~(0xff<<8))|((unsigned int)(idx) & 0xff)<<8))
void mrb_env_unshare(mrb_state*, struct REnv*);
......
......@@ -116,6 +116,13 @@ assert('Kernel#block_given?', '15.3.1.3.6') do
"block"
end
end
def bg_try_in_block
-> { block_given? }[]
end
assert_false bg_try_in_block
assert_true bg_try_in_block{}
end
assert('Kernel#class', '15.3.1.3.7') do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment