diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-20 06:44:04 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-20 06:44:04 -0700 |
| commit | a70419bc4533133118fe8d6edf635b1e0e9bc084 (patch) | |
| tree | 9a7011dd94025c7f2ac44f32b3916d0082266837 /test | |
| parent | cc512dd8d0bd17fa6fba3dfc1b4046b4d4faf68b (diff) | |
| parent | 93b23357fe34e3a0534f92315fcb649d945d7e08 (diff) | |
| download | mruby-a70419bc4533133118fe8d6edf635b1e0e9bc084.tar.gz mruby-a70419bc4533133118fe8d6edf635b1e0e9bc084.zip | |
Merge pull request #1194 from carsonmcdonald/rtomissingimpl
Implement respond_to_missing?
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/kernel.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/t/kernel.rb b/test/t/kernel.rb index abc8f260b..f2f387bb2 100644 --- a/test/t/kernel.rb +++ b/test/t/kernel.rb @@ -392,3 +392,16 @@ assert('Kernel#!=') do (str1 != str3) == true and (str2 != str1) == false end + +assert('Kernel#respond_to_missing?') do + + class Test4RespondToMissing + def respond_to_missing?(method_name, include_private = false) + method_name == :a_method + end + end + + Test4RespondToMissing.new.respond_to?(:a_method) == true and + Test4RespondToMissing.new.respond_to?(:no_method) == false + +end |
