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
9840d6a2
Unverified
Commit
9840d6a2
authored
Jul 17, 2020
by
Yukihiro "Matz" Matsumoto
Committed by
GitHub
Jul 17, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5038 from dearblue/bidx
Fixed shift width for `MRB_ENV_SET_BIDX()`
parents
b5bf9510
5dc87f77
Changes
2
Hide 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 @
9840d6a2
...
@@ -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 @
9840d6a2
...
@@ -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