summaryrefslogtreecommitdiff
path: root/object.c
AgeCommit message (Collapse)Author
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-02* object.c (Init_Object): Added RDoc location pointers fordrbrain
Kernel#methods, Kernel#protected_methods, Kernel#private_methods and Kernel#public_methods. [Bug #6666] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36272 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-19* object.c: Fix typo in rdocmarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-05obj_init_copynobu
* object.c (rb_obj_init_copy): should check if trusted too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-01class_or_module_requirednobu
* object.c (class_or_module_required): extract check for class or module. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-31* object.c (Init_Object): Restored Kernel documentation based ondrbrain
Pickaxe book documentation. Patch by Zachary Scott. [ruby-trunk - Feature #6521] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-31* object.c (rb_equal): Let Object be a link in #=== documentation.drbrain
Patch by Zachary Scott. [ruby-trunk - Feature #6518] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07* object.c (Init_Object): Added reference to variable.c wheredrbrain
public_constant and private_constant documentation lives. [#6381] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24* hash.c, object.c, struct.c, lib/ostruct.rb: add to_h methods.nobu
[Feature #6276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18Revert r35339-35343 because of no tests.naruse
* hash.c: Alias ENV.to_h to ENV.to_hash [ref #6276] * lib/ostruct.rb: Add OpenStruct#to_h [Feature #6276] * struct.c: Add Struct#to_h [Feature #6276] * object.c: Add NilClass#to_h [Feature #6276] * hash.c: Add Hash#to_h [Feature #6276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16* object.c: Add NilClass#to_h [Feature #6276]marcandre
[ref #5008] [rubyspec:dc5ecddbd608] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13* encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "controldrbrain
reaches end of non-void function" warnings. [ruby-trunk - Bug #6066] * re.c (name_to_backref_number): ditto. * object.c (rb_Float): ditto. * io.c (io_readpartial): ditto. * io.c (io_read_nonblock): ditto. * pack.c (rb_uv_to_utf8): ditto. * proc.c (rb_method_entry_arity): ditto. * vm_method.c (rb_f_notimplement): ditto. * struct.c (rb_struct_aset_id): ditto. * class.c (rb_scan_args): ditto. * process.c (rlimit_resource_type): ditto. * process.c (rlimit_resource_value): ditto. * process.c (p_uid_switch): ditto. * process.c (p_gid_switch): ditto. * ext/digest/digest.c (rb_digest_instance_update): ditto. * ext/digest/digest.c (rb_digest_instance_finish): ditto. * ext/digest/digest.c (rb_digest_instance_reset): ditto. * ext/digest/digest.c (rb_digest_instance_block_length): ditto. * ext/bigdecimal/bigdecimal.c (BigDecimalCmp): ditto. * ext/dl/handle.c (rb_dlhandle_close): ditto. * ext/tk/tcltklib.c (pending_exception_check0): ditto. * ext/tk/tcltklib.c (pending_exception_check1): ditto. * ext/tk/tcltklib.c (ip_cancel_eval_core): ditto. * ext/tk/tcltklib.c (lib_get_reltype_name): ditto. * ext/tk/tcltklib.c (create_dummy_encoding_for_tk_core): ditto. * ext/tk/tkutil/tkutil.c (tk_hash_kv): ditto. * ext/openssl/ossl_ssl.c (ossl_ssl_session_reused): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_dsa_verify_asn1): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_at_infinit): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_on_curve): ditto. * ext/fiddle/conversions.c (generic_to_value): ditto. * ext/socket/raddrinfo.c (rsock_io_socket_addrinfo): ditto. * ext/socket/socket.c (sock_s_getnameinfo): ditto. * ext/ripper/eventids2.c (ripper_token2eventid): ditto. * cont.c (return_fiber): ditto. * dmydln.c (dln_load): ditto. * vm_insnhelper.c (vm_search_normal_superclass): ditto. * bignum.c (big_fdiv): ditto. * marshal.c (r_symlink): ditto. * marshal.c (r_symbol): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-30* hash.c, marshal.c, object.c, variable.c: fix callback argument typesnobu
of iterators. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-16 * object.c: Fix indentation of Class#inherited example.drbrain
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-23* object.c (rb_obj_eql): Improve equality documentation by adding andrbrain
example of equal? vs == and recommending eql? be aliased to == when overridden. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-23* object.c (rb_obj_hash): Added note that the hash value is notdrbrain
deterministic on Marc-Andre's suggestion. Expanded description of the purpose of the hash method. [Bug #6068] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-24* object.c (rb_Hash): fix mixed declaration and code.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-24* object.c (rb_Hash): trivial optimization.nobu
* test/ruby/test_object.rb (TestObject#test_convert_hash): fix arguments order. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-24* object.c (rb_Hash): add Kernel#Hash conversion method likematz
Array() or Float(). a patch from Run Paint Run Run. Fix #3131 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-15* object.c (rb_inspect): raise the result is not compatible withnaruse
the default external encoding. [ruby-core:42095] [Bug #5848] If the default external encoding is ASCII compatible, the encoding of inspected result must be compatible with it. If the default external encoding is ASCII incomapatible, the result must be ASCII only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-11* object.c: Added examples for Object#is_a? and Object#instance_of?ayumin
patcheed from Manoj Kumar. [Bug #5880] [ruby-core:42057] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-07Fix typo of rdoc of Object#inspect.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-07* gc.c: use Bitmap Marking algorithm to avoid copy-on-write ofnari
memory pages. See [ruby-dev:45085] [Feature #5839] [ruby-core:41916]. * include/ruby/ruby.h : FL_MARK rename to FL_RESERVED1. * node.h : ditto. * debug.c : ditto. * object.c (rb_obj_clone): FL_MARK move to a bitmap. * class.c (rb_singleton_class_clone): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-06* object.c (rb_inspect): raises Encoding::CompatibilityError if thenaruse
result is incompatible with the default external encoding. [ruby-core:41931] [Bug #5848] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-11* object.c (rb_check_to_int): new function to convert a VALUE tonobu
an Integer if possible, but returns nil instead of raising an exception otherwise. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-10* object.c (Init_Object): Add reference to BasicObject, briefdrbrain
explanation of constant lookup. Based on patch by Alvaro Pereyra Rabanal. [Ruby 1.9 - Bug #5426] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-29* use RB_TYPE_P which is optimized for constant types, instead ofnobu
comparison with TYPE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33357 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-07-27 * object.c: Add usage documentation for BasicObject. Based on patchdrbrain
by Thomas Sawyer. [Ruby 1.9 - Bug #5067] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32700 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-26* parse.y (rb_check_id): make the given name a symbol or a string.nobu
based on the second patch by Jeremy Evans at [ruby-core:38447] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23* error.c (rb_name_error_str): new function to raise NameErrornobu
with the name string but not ID. * object.c, proc.c, variable.c: more removal of inadvertent symbol creation. [Feature #5079] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32645 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-06-29 * math.c: Attach documentation for Math.drbrain
* object.c: Document NIL, TRUE, FALSE. * io.c: Improve grammar in ARGF comment. Document STDIN/OUT/ERR. Document ARGF global constant. * lib/rake: Hide deprecated toplevel constants from RDoc (import from rake trunk). * lib/thwait.rb: Document ThWait. * lib/mathn.rb: Hide Math redefinition from RDoc * lib/sync.rb: Add a basic comment for Sync_m, Synchronizer_m, Sync, Synchronizer. * parse.y: Document SCRIPT_LINES__. * hash.c: Document ENV class and global constant. * vm.c: Document TOPLEVEL_BINDING. * version.c: Document RUBY_* constants. * ruby.c: Document DATA and ARGV. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-27 * object.c (Init_Object): Teach RDoc what Init_class_hierarchy does todrbrain
hook up ri for BasicObject, Object, Module and Class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-18* method.h, internal.h iseq.h: declare internal functions.akr
* compile.c, eval.c, iseq.c, object.c, parse.y, proc.c, process.c, thread.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c: don't declare internal functions. Note that rb_method_entry_eq() is defined in vm_method.c but there was a declaration in proc.c with different const-ness. Now it is declared in method.h with same const-ness to the definition. * object.c (rb_mod_module_exec): don't declare functions declared in include/ruby/intern.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-18* include/ruby/backward/classext.h: for evil gems. fixed #4803nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17* internal.h: declare internal functions here.akr
* node.h: declare NODE dependent internal functions here. * iseq.h: declare rb_iseq_t dependent internal functions here. * vm_core.h: declare rb_thread_t dependent internal functions here. * bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c, enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c, iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y, proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c, thread.c, time.c, transcode.c, variable.c, vm.c, tool/compile_prelude.rb: don't declare internal functions declared in above headers. include above headers if required. Note that rb_thread_mark() was declared as void rb_thread_mark(rb_thread_t *th) in cont.c but defined as void rb_thread_mark(void *ptr) in vm.c. Now it is declared as the later in internal.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 * object.c: Document Module#method_added and #method_removed.drbrain
Patch by Bryce Kerley. [Ruby 1.9 - Feature #4867] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-27* object.c (rb_mod_attr_accessor, rb_mod_const_set): made rdocmarcandre
more precise by specifying Object can searched for Modules. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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