summaryrefslogtreecommitdiff
path: root/object.c
AgeCommit message (Collapse)Author
2011-05-18* internal.h: add for internal use only.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-12 * object.c: format comments to keep 80 columns in a line.nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-11 * object.c (rb_obj_equal): Add documentation. Patch by Vincent Batts.drbrain
[Ruby 1.9 - Bug #4664] * lib/rexml: ditto * lib/mkmf.rb: ditto * ext/socket/lib/socket.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-29 * string.c (rb_String): Kernel#String should call to_str before to_s.nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 * object.c (rb_str_to_dbl): rewrite again. use ALLOCV insteadkosaki
rb_str_tmp_new(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-24 * object.c (rb_str_to_dbl): Fix again. use rb_str_tmp_new()kosaki
instead ALLOC_N. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-24 * object.c (rb_str_to_dbl): use ALLOC_N instead ALLOCA_N becausekosaki
ALLOC_N may cause stack overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-30* object.c: Make BasicObject.new accept no parameter.marcandre
Revert of r26135 [ruby-core:27080], as per [ruby-core:32952]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-26* object.c (Init_Object), constant.h, variable.cmame
(rb_mod_private_constant, rb_mod_public_constant, set_const_visibility, rb_const_get_0): add Module#public_constant and private_constant. [ruby-dev:39685][ruby-core:32698] * test/ruby/test_module.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-26* class.c, constant.h, gc.c, method.h, object.c, variable.c,mame
vm_insnhelper.c: use struct rb_constant_entry_t as entry of RCLASS_CONST_TBL. RCLASS_CONST_TBL has contained VALUE of constant directly. Now instead rb_const_entry_t is contained in RCLASS_CONST_TBL, rb_const_entry_t is managed by malloc, and have not only the value itself but also visibility flag. This is another preparation for private constant (see [ruby-dev:39685][ruby-core:32698]). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-26* class.c, gc.c, object.c, variable.c, vm_insnhelper.c,mame
include/ruby/ruby.h: separate RCLASS_CONST_TBL from RCLASS_IV_TBL. RCLASS_IV_TBL has contained not only instance variable table but also constant table. Now the two table are separated to RCLASS_CONST_TBL and RCLASS_IV_TBL. This is a preparation for private constant (see [ruby-dev:39685][ruby-core:32698]). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-24* array.c, gc.c, hash.c, object.c, string.c, struct.c,nobu
transcode.c, variable.c, vm.c, vm_insnhelper.c, vm_method.c: replace calls to rb_error_frozen() with rb_check_frozen(). a patch from Run Paint Run Run at [ruby-core:32014] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-19Commit miss.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-19* test/ruby/test_sprintf.rb: fix ML ref. [ruby-core:32848]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-18Improved doco for both Module.new and Class.newryan
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-27* object.c (rb_obj_class): remove mention of obsolete method.usa
a patch from Run Paint Run Run at [ruby-core:31842]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-20Add rdoc about Kernel#<=> [ruby-core:31770]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-06* object.c (rb_f_integer): add example with base.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-17* object.c: Object#public_methods, private_methods, etc. returnsmame
method ids that belong to the class or the singleton class(es) of the object. [ruby-dev:41613] * class.c: on the other hand, Module#public_instance_methods, etc. returns method ids that belong to the module itself (even if the module is singleton, it does not return method ids of super class(es); see [ruby-core:28837]). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-29* removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-28* gc.c : use simple lazy sweep algorithm for response performancenari
gain. See [ruby-dev:41067]. * object.c: FL_MARK of some objects by lazy sweep is copied when RVALUE is cloned. These objects are not marked in the mark phase. So delete FL_MARK. * class.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-23* ext/openssl/lib/openssl/x509-internal.rb, lib/forwardable.rb,nobu
lib/irb/cmd/fork.rb, lib/mutex_m.rb, lib/shell/process-controller.rb, lib/sync.rb, object.c: suppress warnings patched by Benoit Daloze at [ruby-core:30366]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17* array.c: Documentation: change => in call-seq to ->.marcandre
Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-01* object.c (rb_cstr_to_dbl): return 0.0 if hexadecimal andnaruse
baccheck is FALSE: Float("0x1p+0") works, but "0x1p+0".to_f doesn't. [ruby-dev:40650] * util.c (ruby_strtod): allow hexdecimal integers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-23enable Object#inspect doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-23* object.c (rb_obj_singleton_class): new methodshugo
Kernel#singleton_class. [ruby-core:21702] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-21* object.c (rb_obj_hash): use LONG2FIX to avoid Bignum allocation.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-08* object.c (rb_obj_clone): call initialize_clone hook method tomatz
call initialize_copy. * object.c (rb_obj_dup): call initialize_dup hook. * lib/delegate.rb (Delegator#initialize_clone): use new hook to implement deep copy. [ruby-dev:40242] * lib/delegate.rb (Delegator#initialize_dup): ditto. * test/test_delegate.rb (TestDelegateClass#test_copy_frozen): add a test to ensure #clone copies frozen status. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-13* object.c (rb_class_initialize): Make sure BasicObject doesn't get ↵marcandre
initialized twice [ruby-core:27577] * class.c (rb_class_init_copy): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-24* lib/object.c (rb_obj_cmp): Default <=> operator returns 0 if objects are ↵marcandre
== [ruby-core:24063] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-20* object.c: BasicObject#initialize accepts any number of arguments ↵marcandre
[ruby-core:27080] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-03fix typos.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-01* object.c (convert_type): Cleanup unused variablemarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-29* array.c (rb_ary_to_ary): do not use #respond_to? to detectmatz
to_ary. Just call. [ruby-core:23738] * eval.c (rb_check_funcall): new function with method existence check. returns Qundef when the method does not exist. * enumerator.c (enumerator_rewind): just call method, using rb_check_funcall(). [ruby-core:23738] * error.c (exc_equal): ditto. * object.c (convert_type): ditto. * error.c (rb_name_err_mesg_new): export function. * eval.c (make_exception): ditto. * io.c (pop_last_hash): return early when the last argument is nil. * io.c (rb_io_puts): treat T_STRING specially for small optimization. * vm_eval.c (raise_method_missing): skip method call if possible using rb_method_basic_definition_p(). * vm_eval.c (method_missing): ditto. * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_debug): test suites changed to ignore exceptions caused by just-call policy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-24* object.c (rb_obj_cmp): defines Object#<=>. [ruby-core:24063]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-21* object.c (rb_obj_inspect): print instance variables only whenmatz
Object#to_s is not overridden. [ruby-core:24425] * class.c (rb_obj_basic_to_s_p): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-21* object.c (rb_obj_inspect): fixed rdoc about the case that to_snobu
is called. [ruby-core:24425] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-13* object.c (rb_mod_const_defined): rdoc fixmarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-03* object.c (rb_f_integer): now Integer() takes optional basematz
argument. base will be ignored for non string values. suggested by Sam Carr at RubyFoo Lounge at London. * test/ruby/test_integer.rb (TestInteger#test_Integer): test updated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-08* include/ruby/st.h (st_hash_func): use st_index_t.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-31* class.c: refactored singleton class related matters.yugui
Handles eigenclasses and plain classes transparently. (make_metaclass): renamed from make_metametaclass. (METACLASS_OF): new utility macro (META_CLASS_OF_CLASS_CLASS): ditto. (ENSURE_EIGENCLASS): ditto. (make_singleton_class): extracted from rb_singleton_class. (boot_defclass): moved from object.c (Init_class_hierarchy): extracted from Init_Object. (rb_make_metaclass): refactored. (singleton_class_of): extracted from rb_singleton_class. (rb_singleton_class): refactored. (rb_define_singleton_method): it needs a metaclass only but not its metametaclass. * object.c: booting class hierarchy was moved to class.c for keeping dependency between compilation units least. (Init_Object): extracting the booting into Init_class_hierarchy. (boot_defclass): moved to class.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-26* random.c (random_rand): unified random_int and random_float.nobu
[ruby-dev:39158]. and fixes [ruby-core:24655], [ruby-core:24677], [ruby-core:24679]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-18* suppressed shorten-64-to-32 warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-12* object.c (rb_to_integer, rb_check_to_integer): return Bignumnobu
as-is. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-01* hash.c (rb_hash_hash): documentation fix. a patch frommatz
Marc-Andre Lafortune. [ruby-core:23943] * object.c (rb_mod_cmp): ditto. * range.c (range_eq): ditto. * string.c (rb_str_partition, rb_str_rpartition): ditto. * struct.c (rb_struct_s_def): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-29Doxy-commentyugui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-29Doxy-comments.yugui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-29* object.c: updated the diagram of metaclass hierarchy in rdoc.yugui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-24update rdoc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22stripped trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e