summaryrefslogtreecommitdiff
path: root/test/ruby/test_module.rb
AgeCommit message (Collapse)Author
2013-03-30* test/ruby/test_class.rb: Simplify warning checksmarcandre
* test/ruby/test_io.rb: ditto * test/ruby/test_module.rb: ditto * test/ruby/test_regexp.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-13vm_method.c: overrid flag of prepending methodnobu
* vm_method.c (rb_export_method): directly override the flag of method defined in prepending class too, not adding zsuper entry. [ruby-core:53106] [Bug #8005] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-07* class.c (rb_mod_ancestors): Include singleton_class in ancestors listmarcandre
[Feature #8035] * test/ruby/test_module.rb (class): test for above * test/ruby/marshaltestlib.rb (module): adapt test * NEWS: list change git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05class.c: check redefinitionnobu
* class.c (rb_prepend_module): check redefinition of built-in opimized methods. [ruby-dev:47124] [Bug #7983] * vm.c (rb_vm_check_redefinition_by_prepend): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-14class.c: cyclic prependnobu
* class.c (include_modules_at): detect cyclic prepend with original method table. [ruby-core:52205] [Bug #7841] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-14vm_method.c: fix method_removednobu
* vm_method.c: call method_removed hook on called class, not on prepending iclass. [ruby-core:52207] [Bug #7843] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-14vm_method.c: fix method_removednobu
* vm_method.c: call method_removed hook on called class, not on prepending iclass. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-11* insns.def (defineclass): private constants should not be accessedshugo
by scoped module definitions. The bug was introduced in r38495. * test/ruby/test_module.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-07* vm_method.c (Init_eval_method): main.public and main.privateshugo
should be private. * proc.c (Init_Proc): main.define_method should be private. * test/ruby/test_module.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-07* eval.c (Init_eval): main.include should be private.shugo
[ruby-core:51293] [Bug #7670] * test/ruby/test_module.rb (test_top_include_is_private): a new test for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-27* variable.c (rb_mod_remove_const): fix segv caused by r38558.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22internal.h: quote unprintablenobu
* internal.h (QUOTE, QUOTE_ID): quote unprintable chars in strings and IDs. [Bug #7574] [ruby-dev:46749] * string.c (rb_str_quote_unprintable): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22object.c: no nested symbolnobu
* object.c (rb_mod_const_get): symbol cannot be nested constant name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22object.c: check more strictlynobu
* object.c (rb_mod_const_get): check more strictly. [ruby-dev:46748] [Bug #7573] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-19object.c: nul in const namenobu
* object.c (rb_mod_const_get): nul byte is invalid as constant name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-12vm_insnhelper.c: no warnings for non-objectnobu
* vm_insnhelper.c (vm_getivar): no uninitialized instance variables warnings for non-object if attr method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06* object.c (rb_mod_const_get): Fix constant missing exception classtenderlove
and message to maintain backwards compatibility. Constant search should start at Object when constant starts with '::' * test/ruby/test_module.rb: test for fixes git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-26* object.c (rb_mod_const_get): const_get accepts qualified constanttenderlove
strings. e.g. Object.const_get("Foo::Bar::Baz") [ruby-core:41404] * test/ruby/test_module.rb: tests for new behavior git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-27adding test coverage for invalid attribute namestenderlove
Fixes #171 on github git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-20vm_insnhelper.c: iclass as klass in cfpnobu
* vm_insnhelper.c (vm_call_method): follow iclasses as klass in cfp but not included modules. [ruby-core:47241] [Bug #6891] * vm_insnhelper.c (vm_call_bmethod): pass defined_class to follow proper ancestors. [ruby-core:47241] [Bug #6891] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-20test_module.rb: workaround for ruby-mode.elnobu
* test/ruby/test_module.rb (TestModule#test_undef): get rid of confusing ruby-mode.el by mixing special characters in //. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-31class.c: fix duplication of prepended modulenobu
* class.c (include_class_new): fix duplication of prepended module. since m_tbl of prepended module is always zero, copy from its copy iclass of original. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-31 * test/ruby/test_module.rb (TestModule#test_classpath): fixnobu
typos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-30variable.c: fix r36574nobu
* variable.c (find_class_path): no retry when preferred is given. * variable.c (classname): if classid is set try it to find full qualified class path, and then try arbitrary class path. try tmp_classpath at last even if enclosing namespace is anonymous. fix r36574. [ruby-core:42865][Bug #6078] * variable.c (rb_set_class_path_string, rb_set_class_path): set tmp_classpath instead of classpath if the name is not permanent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-30variable.c: tmp_classpathnobu
* variable.c: store anonymous class path in tmp_classpath but not in classpath. [ruby-core:42865][Bug #6078] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-19* variable.c (rb_mod_class_variables): return inherited variablesshugo
except when the optional argument is set to false. [ruby-dev:44034] [Bug #4971] * variable.c (rb_mod_constants): fix typo in documentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-02prepend: fix mixing with includenobu
* class.c (rb_include_module): include modules after the origin. * class.c (include_modules_at): skip prepended modules. * class.c (rb_prepend_module): now basic.klass in ICLASS refers the old original class/module. [ruby-dev:45868][Bug #6662] * class.c (rb_mod_ancestors): ditto. * vm_method.c (search_method): search method entry from the origin iclass. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-28* class.c (class_instance_method_list): consider prepended Class/Modulenagachika
when recur != 0. [ruby-dev:45863] [Bug #6660] * test/ruby/test_module.rb (test_prepend_instance_methods_false): add a test for it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-27prepend: fix ancestors ordernobu
* class.c (rb_mod_ancestors): fix ancestors order. [ruby-core:45919][Bug #6658] [ruby-dev:45861][Bug #6659] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-27remove from original m_tblnobu
* vm_method.c (remove_method): remove the method from the original m_tbl on a prepended module. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-27fix null m_tblnobu
* class.c (rb_obj_singleton_methods): m_tbl in prepended class/module is NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-27ancestor modulesnobu
* class.c (rb_prepend_module): ancestors of prepending module also should be included. [ruby-core:45914][Bug #6654] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-27fix null m_tblnobu
* class.c (class_instance_method_list): m_tbl in prepended class/module is NULL. [ruby-core:45915][Bug #6655] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-27Module#prependnobu
* class.c (rb_prepend_module): prepend module into another module. * eval.c (rb_mod_prepend): new method Module#prepend. [Feature #1102] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-25Revert r31873 Module#mixnobu
* class.c (rb_mix_module): revert Module#mix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-22* class.c (rb_mod_init_copy): Clear the cached inspect string of adrbrain
dup'd anonymous module or class. [ruby-trunk - Bug #6454] * test/ruby/test_module.rb (class TestModule): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-16fix typonobu
* test/ruby/test_module.rb (test_method_redefinition): fix typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-08* variable.c (set_const_visibility): clear inine-cache when constant'snagachika
visibility is modified. [ruby-dev:44929] * test/ruby/test_module.rb (test_private_constants_clear_inlinecache): add test for it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-03* variable.c (set_const_visibility): Module#private_constant hasmame
changed the visibility of only the first argument. Now it changes all of them. [ruby-list:48558] * test/ruby/test_module.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-30Fix 33906: remove JSON::Ext::Generator::GeneratorMethods::String.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-30* test/ruby/test_module.rb (TestModule): removed remove_*_mixins methods.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-30* lib/mkmf.rb: Use MakeMakefile's rm_f to avoid conflict with Rake ordrbrain
FileUtils. * test/ruby/test_module.rb: Hide MakeMakefile's inclusion in Object git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-07* test/-ext-/symbol/test_inadvertent_creation.rb: moved tests fromnobu
test_module.rb and test_symbol.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-02* vm_insnhelper.c (vm_search_const_defined_class): searchnobu
ancestors only when global scope. [ruby-core:39227] [Bug #5264] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-01* insns.def (defineclass), vm_insnhelper.c (vm_get_cvar_base): seenobu
also inherited constants for classes without superclass and modules. [ruby-core:37698] [Bug #3423] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-23fixed tests broken by new minitest mixinryan
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26* eval_error.c (rb_print_undef_str): new function to raisenobu
NameError for undefined method. * load.c (rb_mod_autoload_p), object.c (rb_mod_const_get), variable.c (rb_f_untrace_var, set_const_visibility), vm_method.c (rb_mod_{remove,undef,alias}_method, set_method_visibility): remove inadvertent symbol creation. based on the first patch by Jeremy Evans at [ruby-core:38447]. [Feature #5089] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23* parse.y (rb_check_id): conversion condition was inverse.nobu
[Bug #5084] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22* object.c (rb_mod_{const,cvar}_defined, rb_obj_ivar_defined):nobu
avoid inadvertent symbol creation in reflection methods. based on a patch by Jeremy Evans at [ruby-core:38367]. [Feature #5072] * vm_method.c (rb_mod_method_defined) (rb_mod_{public,private,protected}_method_defined) (obj_respond_to): ditto. * parse.y (rb_check_id): new function returns already interned ID or 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-17* test/ruby/test_module.rb (TestModule#test_method_{undefined,removed}):nobu
tests for method_undefined and method_removed. Bug#5015 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e