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
17974aa2
Unverified
Commit
17974aa2
authored
Apr 27, 2020
by
Yukihiro "Matz" Matsumoto
Committed by
GitHub
Apr 27, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4978 from dearblue/test-ensure
Integrate class `EnsureYieldBreak` under test
parents
0a7fd86d
81c83521
Changes
1
Show 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 @
17974aa2
##
# ensure Test
assert
(
'ensure - context - yield'
)
do
class
EnsureYieldBreak
class
EnsureYieldBreak
attr_reader
:ensure_context
def
try
yield
ensure
@ensure_context
=
self
end
end
end
assert
(
'ensure - context - yield'
)
do
yielder
=
EnsureYieldBreak
.
new
yielder
.
try
do
end
...
...
@@ -18,15 +18,6 @@ assert('ensure - context - yield') do
end
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
.
try
do
break
...
...
@@ -35,15 +26,6 @@ assert('ensure - context - yield and break') do
end
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
lambda
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