diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-07-19 09:08:11 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-07-19 09:08:11 +0900 |
| commit | ca2cfc6fe91c60c7e8014dec1f36dda719c67ba1 (patch) | |
| tree | f469ecb5696628f4e302fdfc5c9a406bdd7d6646 /mrbgems/mruby-class-ext/test/module.rb | |
| parent | 645b0fb58c9dda7d15cc42748d74d791380444db (diff) | |
| parent | dd52b881017ae2c39d8afeed4f0560eff19031da (diff) | |
| download | mruby-ca2cfc6fe91c60c7e8014dec1f36dda719c67ba1.tar.gz mruby-ca2cfc6fe91c60c7e8014dec1f36dda719c67ba1.zip | |
Merge pull request #3746 from christopheraue/mod_singleton_class_p
Implemented Module#singleton_class?
Diffstat (limited to 'mrbgems/mruby-class-ext/test/module.rb')
| -rw-r--r-- | mrbgems/mruby-class-ext/test/module.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mrbgems/mruby-class-ext/test/module.rb b/mrbgems/mruby-class-ext/test/module.rb index cfe6a540f..65abde108 100644 --- a/mrbgems/mruby-class-ext/test/module.rb +++ b/mrbgems/mruby-class-ext/test/module.rb @@ -22,3 +22,13 @@ assert 'Module#name' do assert_nil mod.name assert_nil cls.name end + +assert 'Module#singleton_class?' do + mod = Module.new + cls = Class.new + scl = cls.singleton_class + + assert_false mod.singleton_class? + assert_false cls.singleton_class? + assert_true scl.singleton_class? +end |
