summaryrefslogtreecommitdiffhomepage
path: root/test/t/module.rb
AgeCommit message (Collapse)Author
2019-03-14Fix constant name validationKOBAYASHI Shuji
`X!` etc are invalid constant name.
2019-02-19Use more appropriate assertion methodsKOBAYASHI Shuji
2019-01-28`class`/`module` expression with empty body should return `nil`KOBAYASHI Shuji
Before: p(class A end) #=> A p(class << self; end) #=> #<Class:#<Object:0x7fdc3880e420>> p(module B end) #=> B After/Ruby: p(class A end) #=> nil p(class << self; end) #=> nil p(module B end) #=> nil
2018-09-01Move `Kernel#send` to `mruby-metaprog` gem.Yukihiro "Matz" Matsumoto
But `BasicObject#__send__` is still available from the core.
2018-08-30Separate meta-programming features to `mruby-metaprog` gem.Yukihiro "Matz" Matsumoto
We assume meta-programming is less used in embedded environments. We have moved following methods: * Kernel module global_variables, local_variables, singleton_class, instance_variables, instance_variables_defined?, instance_variable_get, instance_variable_set, methods, private_methods, public_methods, protected_methods, singleton_methods, define_singleton_methods * Module class class_variables, class_variables_defined?, class_variable_get, class_variable_set, remove_class_variable, included_modules, instance_methods, remove_method, method_removed, constants * Module class methods constants, nesting Note: Following meta-programming methods are kept in the core: * Module class alias_method, undef_method, ancestors, const_defined?, const_get, const_set, remove_const, method_defined?, define_method * Toplevel object define_method `mruby-metaprog` gem is linked by default (specified in default.gembox). When it is removed, it will save 40KB (stripped:8KB) on x86-64 environment last time I measured.
2018-08-11Fix misspelling words in commentsKazuhiro Sera
2017-08-29Refactored #assert_raise and #assert_nothing_raisedChristopher Aue
2017-08-01Implements `Module::nesting' (15.2.2.3.2); ref #600, #3200Yukihiro "Matz" Matsumoto
2017-07-29Merge pull request #3757 from christopheraue/module_const_get_class_pathYukihiro "Matz" Matsumoto
Extended Module#const_get to support class paths
2017-07-28Extended Module#const_get to support class pathsChristopher Aue
2017-07-28Fixed return value of Module#include and #prependChristopher Aue
2017-07-18Fixed Module#to_s and #name for #const_set modulesChristopher Aue
2017-03-31Modify to get constant of parent module in singleton class; fix #3568Kouichi Nakanishi
2016-10-12Module#define_method supports proc argumentksss
2015-07-13Clean up testsBlaž Hrastnik
2015-07-13assert() cannot be nestedBlaž Hrastnik
2015-07-13Set origin when doing kind_of? comparisonsBlaž Hrastnik
2015-07-13Enable test_prepend_module_ancestors because it seems to pass.Blaž Hrastnik
2015-07-13Space out test_prepend_super_in_alias assertCorey Powell
Also tried to fix it, however the problem lies with how aliased methods are done and their internal structure. mruby simply aliases methods by grabbing the RProc and giving it a new name, super then determines the original method to call by using the name so a method called m, aliased as m2, will call the m2 super method instead of m
2015-07-13Enable visibility prepend tests againBlaž Hrastnik
2015-07-13Ported all MRI prepend testsCorey Powell
And of course, some of them fail miserably
2015-07-13Removed some debug prints from the testCorey Powell
2015-07-13Ported a bit more of the MRI Module#prepend tests overCorey Powell
Currently kind_of fails miserably, still looking for the reason
2015-07-13Rename classes because of conflictsBlaž Hrastnik
2015-07-13Implement Module#prepend.Blaž Hrastnik
2015-05-29check if outer is a class or modulecremno
For modules this check didn't exist yet. Also call #inspect.
2014-10-20instance_methods etc should not include undef'ed method names; based on a ↵Yukihiro "Matz" Matsumoto
patch from @cremno; fix #2613
2014-08-20Remove empty lines.Tatsuhiko Kubo
2014-07-18add Module#module_functiondreamedge
2014-06-15Move direct superclass checking to `test/t/superclass.rb`.take_cheeze
2014-05-21Module#initialize set created objectksss
for block argument
2014-05-19Implement Module#initialize (15.2.2.4.31)ksss
2014-05-18instance method name use "#" instead of "." for assertksss
2014-04-30remove trailing spacesNobuyoshi Nakada
2014-01-25clone Class/Module rightlyh2so5
2013-12-24Change :vattr= to :cattr= in respond_to? testCarson McDonald
2013-12-09modify test case to check #1606Yukihiro "Matz" Matsumoto
2013-08-13Add two tests for issue #1467Carson McDonald
2013-08-02I fix order of actual and expect test value in module.rb.Jun Hiroe
2013-07-21Cleaned up some of the Module#attr testsRyan Scott
2013-07-19Wrote tests around attr, attr_reader, attr_writer, attr_accessorRyan Scott
2013-06-15Improve Module TestsDaniel Bovensiepen
2013-04-30the receiver should be included in ancestors even when it's a singleton classYukihiro "Matz" Matsumoto
2013-04-25fix Module#ancestors and update testskandhas
2013-04-21Remove unused variableCarson McDonald
2013-04-20fix test to check class variables in superclassesYukihiro "Matz" Matsumoto
2013-04-06Add some tests.Masaki Muranaka
2013-04-02Add test cases.Masaki Muranaka
2013-02-16Add Module#remove_const testDaniel Bovensiepen
2013-01-04add test for Module#method_defined?skandhas