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
79c46187
Commit
79c46187
authored
Oct 05, 2015
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2975 from yasuyuki/eval_rescue
Add regression test for #2933
parents
e1ec2b02
49bfaca6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
mrbgems/mruby-eval/test/eval.rb
mrbgems/mruby-eval/test/eval.rb
+19
-0
No files found.
mrbgems/mruby-eval/test/eval.rb
View file @
79c46187
...
...
@@ -78,3 +78,22 @@ assert('Kernel.#eval(string) context') do
assert_equal
(
'class'
)
{
obj
.
const_string
}
end
assert
(
'Object#instance_eval with begin-rescue-ensure execution order'
)
do
class
HellRaiser
def
raise_hell
order
=
[
:enter_raise_hell
]
begin
order
.
push
:begin
self
.
instance_eval
(
"raise 'error'"
)
rescue
order
.
push
:rescue
ensure
order
.
push
:ensure
end
order
end
end
hell_raiser
=
HellRaiser
.
new
assert_equal
([
:enter_raise_hell
,
:begin
,
:rescue
,
:ensure
],
hell_raiser
.
raise_hell
)
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