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
5e8dc8cd
Commit
5e8dc8cd
authored
Nov 26, 2012
by
skandhas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Module#instance_methods test
parent
6fb74ac1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
test/t/module.rb
test/t/module.rb
+20
-0
No files found.
test/t/module.rb
View file @
5e8dc8cd
...
...
@@ -132,6 +132,26 @@ assert('Module#included_modules', '15.2.2.4.30') do
r
.
class
==
Array
and
r
.
include?
(
Test4includedModules
)
end
assert
(
'Module#instance_methods'
,
'15.2.2.4.33'
)
do
module
Test4InstanceMethodsA
def
method1
()
end
end
class
Test4InstanceMethodsB
def
method2
()
end
end
class
Test4InstanceMethodsC
<
Test4InstanceMethodsB
def
method3
()
end
end
r
=
Test4InstanceMethodsC
.
instance_methods
(
true
)
Test4InstanceMethodsA
.
instance_methods
==
[
:method1
]
and
Test4InstanceMethodsB
.
instance_methods
(
false
)
==
[
:method2
]
and
Test4InstanceMethodsC
.
instance_methods
(
false
)
==
[
:method3
]
and
r
.
class
==
Array
and
r
.
include?
(
:method3
)
and
r
.
include?
(
:method2
)
end
# Not ISO specified
assert
(
'Module#to_s'
)
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