summaryrefslogtreecommitdiff
path: root/test/ruby/test_class.rb
AgeCommit message (Collapse)Author
2014-11-13* test/lib/envutil.rb: Moved from test/ruby/.akr
* test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-13class.c: freeze meta class onlynobu
* class.c (singleton_class_of): should not propagete freezing to meta meta class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-13eval.c: fix message as same as previous versionsnobu
* eval.c (rb_frozen_class_p): fix message for singleton class of class/module as same as previous versions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12vm_method.c: should not modify frozen objectsnobu
* vm_method.c (rb_method_entry_make, remove_method): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-07* object.c (rb_mod_initialize_clone): Override Kernel#initialize_cloneakr
to avoid an exception on Class.new.freeze.clone.to_s. Reported by Andrew Grimm. [ruby-core:41858] [Bug #5828] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-13object.c: undef Module#prepend_features on Classnobu
* object.c (Init_Object): undef Module#prepend_features on Class, as well as Module#append_features. [Fixes GH-376] * test_class.rb: Added test for above. And ensure type checking on similar methods as module_function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-08object.c: Module#singleton_class?nobu
* object.c (rb_mod_singleton_p): new method Module#singleton_class? to return whether the receiver is a singleton class or not. [ruby-core:51087] [Feature #7609] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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
2012-12-29object.c: singleton class clonenobu
* object.c (rb_obj_clone): attach clone to its singleton class during cloning singleton class so that singleton_method_added will be called on it. based on the patch by shiba (satoshi shiba)[Bug #5283] in [ruby-dev:44477]. [Bug #5283] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-29* test/ruby/test_class.rb (test_cannot_reinitialize_class_with_initialize_copy),nobu
(test_invalid_superclass): get rid of confusing ruby-mode.el. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20* vm_core.h (rb_vm_defineclass_type_t),shugo
compile.c (iseq_compile_each), insns.def (defineclass): change the meaning of the third operand of defineclass as follows: lower 3bits: the type of the defineclass 0 = class, 1 = singleton class, 2 = module 4th bit: a flag represents whether the defineclass is scoped 0 = not scoped (e.g., class Foo) 1 = scoped (e.g., class Bar::Baz) 5th bit: a flag represents whether the superclass is specified 0 = not specified (e.g., class Foo) 1 = specified (e.g., class Bar < Foo) If the superclass is specified and is not a class, a TypeError should be raised. [ruby-dev:46747] [Bug #7572] * test/ruby/test_class.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-17* class.c (rewrite_cref_stack, clone_method): rewrite a method's crefcharliesome
stack when cloning into a new class to allow lexical const lookup to work as expected [ruby-core:47834] [Bug #7107] * test/ruby/test_class.rb (class TestClass): related test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-13 * object.c (Init_Object): use rb_mod_init_copy for Class#initialize_copycharliesome
* class.c (rb_class_init_copy): rename to class_init_copy_check, performs type checks on arguments to prevent reinitialization of initialized class [ruby-core:50869] [Bug #7557] * class.c (rb_mod_init_copy): use class_init_copy_check if receiver is T_CLASS * test/ruby/test_class.rb (class TestClass): related test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-27* numeric.c (rb_float_new_in_heap), include/ruby/ruby.h:ko1
make all Float objects frozen. [ruby-dev:46081] [ruby-trunk - Feature #6936] Most part of patch by NARUSE, Yui <naruse@ruby-lang.org>. * class.c (singleton_class_of): raise TypeError when trying to define a singleton method on Float objects. * vm.c (vm_define_method): ditto. * test/ruby/marshaltestlib.rb: catch up above changes. * test/ruby/test_class.rb: ditto. * test/test_pp.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-24Fix r36805.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23Test for r36803's singleton_class_of.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-16object.c: forbid uninitialized classnobu
* object.c (rb_class_initialize): forbid inheriting uninitialized class. another class tree not based on BasicObject cannot exist. [ruby-core:47148][Bug #6863] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-18* object.c (rb_obj_clone): singleton class should be attachednobu
singleton object to. a patch by Satoshi Shiba <shiba AT rvm.jp> at [ruby-dev:44460]. [Bug #5274] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28* compile.c (NODE_CLASS, NODE_MODULE), insns.def (defineclass): raisemame
an exception when "class Foo::Bar" is evaluated and Foo::Bar is private. To implement this, define_type of "defineclass" is added so that the instruction can distinguish whether the class definition is scoped (class Foo::Bar) or not (class Bar). * test/ruby/test_class.rb (test_redefine_private_class), test/ruby/test_module.rb (test_define_module_under_private_constant): add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-17* class.c (rb_define_{class,module}_id_under): register to benobu
marked, which probably are defined and used internally. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-10* iseq.c (rb_iseq_clone): sets local_iseq and klass properly.shugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-06* class.c (rb_class_init_copy): raise a TypeError if the argument isshugo
BasicObject. [ruby-core:27060] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-21* test/ruby/test_bignum.rb, test/ruby/test_class.rb,mame
test/ruby/test_defined.rb, test/ruby/test_hash.rb, test/ruby/test_primitive.rb, test/ruby/test_variable.rb: add some tests (for coverage). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-23* class.c (rb_class_new): move class check to rb_check_inheritable().matz
* class.c (rb_check_inheritable): should not allow subclass of class Class. [ruby-core:26225] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-03* vm_method.c (rb_add_method_def): no redefinition warning onnobu
undef. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-30* vm_method.c (rb_add_method_def): show the location wherenobu
overwritten method was defined. [ruby-dev:39400] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-29* test/ruby/test_class.rb (test_method_redefinition): commit miss.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-29* test/ruby/test_{class,module}.rb (test_method_redefinition): includenobu
warned line number. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-29* test/ruby/test_{class,module}.rb (test_method_redefinition): refined.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-29* vm_method.c (rb_add_method_def): nothing to do if old method hadnobu
same definition. [ruby-dev:39397] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-29* test/ruby/test_class.rb (test_module_function): tests for warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-30* insns.def (defineclass): preserve encoding of class/modulenobu
names. [ruby-core:24600] * variable.c (rb_set_class_path_string): set class path with a string value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-15* test/ruby/envutil.rb (Test::Unit::Assertions#assert_in_out_err): newmame
method. * test/ruby/test_argf.rb: use assert_in_out_err instead of EnvUtil.rubyexec. * test/ruby/test_module.rb: ditto. * test/ruby/test_require.rb: ditto. * test/ruby/test_objectspace.rb: ditto. * test/ruby/test_object.rb: ditto. * test/ruby/test_string.rb: ditto. * test/ruby/test_method.rb: ditto. * test/ruby/test_variable.rb: ditto. * test/ruby/test_io.rb: ditto. * test/ruby/test_rubyoptions.rb: ditto. * test/ruby/test_exception.rb: ditto. * test/ruby/test_class.rb: ditto. * test/ruby/test_thread.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-02* test/ruby/test_file.rb: add tests for uninitialized object.mame
* test/ruby/test_class.rb: ditto. * test/ruby/test_thread.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-21* test/ruby/test_require.rb: new tests for library requiring, tomame
achieve over 90% test coverage of dln.c. * test/ruby/test_class.rb: add tests to achieve over 90% test coverage of class.c. * test/ruby/test_module.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-14* test/ruby/test_object.rb: new tests to achieve over 90% testmame
coverage of object.c, eval.c and eval_method.c. * test/ruby/test_module.rb: ditto. * test/ruby/test_trace.rb: ditto. * test/ruby/test_integer.rb: ditto. * test/ruby/test_float.rb: ditto. * test/ruby/test_method.rb: ditto. * test/ruby/test_variable.rb: ditto. * test/ruby/test_eval.rb: ditto. * test/ruby/test_exception.rb: ditto. * test/ruby/test_class.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-31 * Merge YARVko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e