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
adea2ca3
Commit
adea2ca3
authored
May 10, 2014
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2223 from yui-knk/fix-nameerror
Delete unused NameError#new. And add test.
parents
e59c6a11
1a00a34c
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 @
adea2ca3
...
...
@@ -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 @
adea2ca3
...
...
@@ -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