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
81c83521
Commit
81c83521
authored
Apr 26, 2020
by
dearblue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Integrate class `EnsureYieldBreak` under test
parent
954ce537
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
26 deletions
+8
-26
test/t/ensure.rb
test/t/ensure.rb
+8
-26
No files found.
test/t/ensure.rb
View file @
81c83521
##
##
# ensure Test
# ensure Test
assert
(
'ensure - context - yield'
)
do
class
EnsureYieldBreak
class
EnsureYieldBreak
attr_reader
:ensure_context
attr_reader
:ensure_context
def
try
def
try
yield
yield
ensure
ensure
@ensure_context
=
self
@ensure_context
=
self
end
end
end
end
assert
(
'ensure - context - yield'
)
do
yielder
=
EnsureYieldBreak
.
new
yielder
=
EnsureYieldBreak
.
new
yielder
.
try
do
yielder
.
try
do
end
end
...
@@ -18,15 +18,6 @@ assert('ensure - context - yield') do
...
@@ -18,15 +18,6 @@ assert('ensure - context - yield') do
end
end
assert
(
'ensure - context - yield and break'
)
do
assert
(
'ensure - context - yield and break'
)
do
class
EnsureYieldBreak
attr_reader
:ensure_context
def
try
yield
ensure
@ensure_context
=
self
end
end
yielder
=
EnsureYieldBreak
.
new
yielder
=
EnsureYieldBreak
.
new
yielder
.
try
do
yielder
.
try
do
break
break
...
@@ -35,15 +26,6 @@ assert('ensure - context - yield and break') do
...
@@ -35,15 +26,6 @@ assert('ensure - context - yield and break') do
end
end
assert
(
'ensure - context - yield and return'
)
do
assert
(
'ensure - context - yield and return'
)
do
class
EnsureYieldBreak
attr_reader
:ensure_context
def
try
yield
ensure
@ensure_context
=
self
end
end
yielder
=
EnsureYieldBreak
.
new
yielder
=
EnsureYieldBreak
.
new
lambda
do
lambda
do
yielder
.
try
do
yielder
.
try
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