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
f568b49e
Commit
f568b49e
authored
May 05, 2013
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1236 from carsonmcdonald/moreresptotests
Adding a few more respond_to tests
parents
5e40c9bd
61c0b8f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
test/t/kernel.rb
test/t/kernel.rb
+15
-1
No files found.
test/t/kernel.rb
View file @
f568b49e
...
...
@@ -354,12 +354,26 @@ end
# Kernel#require is defined in mruby-require. '15.3.1.3.42'
assert
(
'Kernel#respond_to?'
,
'15.3.1.3.43'
)
do
e_list
=
[]
class
Test4RespondTo
def
valid_method
;
end
def
test_method
;
end
undef
test_method
end
respond_to?
(
:nil?
)
and
Test4RespondTo
.
new
.
respond_to?
(:
test_method
)
==
false
begin
Test4RespondTo
.
new
.
respond_to?
(
1
)
rescue
=>
e
e_list
<<
e
.
class
end
e_list
[
0
]
==
TypeError
and
respond_to?
(:
nil
?)
and
Test4RespondTo
.
new
.
respond_to?
(
:valid_method
)
==
true
and
Test4RespondTo
.
new
.
respond_to?
(
'valid_method'
)
==
true
and
Test4RespondTo
.
new
.
respond_to?
(
:test_method
)
==
false
end
assert
(
'Kernel#send'
,
'15.3.1.3.44'
)
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