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
1a00a34c
Commit
1a00a34c
authored
May 10, 2014
by
yui-knk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete unused NameError#new. And add test.
parent
e07a3731
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
mrblib/error.rb
mrblib/error.rb
+0
-4
test/t/exception.rb
test/t/exception.rb
+10
-0
No files found.
mrblib/error.rb
View file @
1a00a34c
...
...
@@ -40,10 +40,6 @@ end
class
NameError
<
StandardError
attr_accessor
:name
def
new
(
message
=
"NameError"
,
name
=
nil
)
initialize
(
message
,
name
)
end
def
initialize
(
message
=
nil
,
name
=
nil
)
@name
=
name
super
(
message
)
...
...
test/t/exception.rb
View file @
1a00a34c
...
...
@@ -42,6 +42,16 @@ assert('Exception.exception', '15.2.22.4.1') do
assert_equal
'a'
,
e
.
message
end
assert
(
'NameError'
,
'15.2.31'
)
do
assert_raise
(
NameError
)
do
raise
NameError
.
new
end
e
=
NameError
.
new
"msg"
,
"name"
assert_equal
"msg"
,
e
.
message
assert_equal
"name"
,
e
.
name
end
assert
(
'ScriptError'
,
'15.2.37'
)
do
assert_raise
(
ScriptError
)
do
raise
ScriptError
.
new
...
...
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