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
476af3c6
Commit
476af3c6
authored
Sep 02, 2017
by
Yukihiro "Matz" Matsumoto
Committed by
GitHub
Sep 02, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3802 from christopheraue/proc_break_tests
Tested local jump errors caused by break in a proc
parents
ab99e2c2
35deaae7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
mrbgems/mruby-proc-ext/test/proc.rb
mrbgems/mruby-proc-ext/test/proc.rb
+4
-0
test/t/proc.rb
test/t/proc.rb
+14
-0
No files found.
mrbgems/mruby-proc-ext/test/proc.rb
View file @
476af3c6
...
...
@@ -66,6 +66,10 @@ end
assert
(
'Kernel#proc'
)
do
assert_true
!
proc
{
|
a
|
}.
lambda?
assert_raise
LocalJumpError
do
proc
{
break
}.
call
end
end
assert
(
'mrb_proc_new_cfunc_with_env'
)
do
...
...
test/t/proc.rb
View file @
476af3c6
...
...
@@ -11,6 +11,10 @@ assert('Proc.new', '15.2.17.3.1') do
end
assert_equal
(
Proc
.
new
{}).
class
,
Proc
assert_raise
LocalJumpError
do
Proc
.
new
{
break
}.
call
end
end
assert
(
'Proc#[]'
,
'15.2.17.4.1'
)
do
...
...
@@ -164,3 +168,13 @@ assert('&obj call to_proc if defined') do
assert_raise
(
TypeError
){
mock
(
&
(
Object
.
new
))
}
end
assert
(
'Creation of a proc through the block of a method'
)
do
def
m
(
&
b
)
b
end
assert_equal
m
{}.
class
,
Proc
assert_raise
LocalJumpError
do
m
{
break
}.
call
end
end
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