Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
cdf45438
Commit
cdf45438
authored
Jul 16, 2020
by
dearblue
Committed by
Hiroshi Mimaki
Jul 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed shift width for `MRB_ENV_SET_BIDX()`
ref
c07f24cd
and close #5035
parent
b6b9c57f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
include/mruby/proc.h
include/mruby/proc.h
+1
-1
test/t/kernel.rb
test/t/kernel.rb
+7
-0
No files found.
include/mruby/proc.h
View file @
cdf45438
...
@@ -34,7 +34,7 @@ struct REnv {
...
@@ -34,7 +34,7 @@ struct REnv {
#define MRB_ENV_HEAP_P(e) ((e)->flags & MRB_ENV_HEAPED)
#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_ONSTACK_P(e) (((e)->flags & MRB_ENV_CLOSED) == 0)
#define MRB_ENV_BIDX(e) (((e)->flags >> 8) & 0xff)
#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
*
);
void
mrb_env_unshare
(
mrb_state
*
,
struct
REnv
*
);
...
...
test/t/kernel.rb
View file @
cdf45438
...
@@ -116,6 +116,13 @@ assert('Kernel#block_given?', '15.3.1.3.6') do
...
@@ -116,6 +116,13 @@ assert('Kernel#block_given?', '15.3.1.3.6') do
"block"
"block"
end
end
end
end
def
bg_try_in_block
->
{
block_given?
}[]
end
assert_false
bg_try_in_block
assert_true
bg_try_in_block
{}
end
end
assert
(
'Kernel#class'
,
'15.3.1.3.7'
)
do
assert
(
'Kernel#class'
,
'15.3.1.3.7'
)
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment