summaryrefslogtreecommitdiff
path: root/object.c
AgeCommit message (Collapse)Author
2004-02-10* eval.c (method_proc): return bound Proc object. [ruby-dev:22854]nobu
* eval.c (rb_mod_define_method): bind method body itself for Method object. * node.h (NODE_DMETHOD): deprecated. * object.c (rb_class_inherited_p): export. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-10* object.c (rb_obj_clone, rb_obj_dup): mentioned aboutnobu
initialize_copy. [ruby-core:02339] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-22* pack.c (num2i32): pack should not raise RangeError.matz
[ruby-dev:22654] * pack.c (pack_pack): do not auto convert nil to zero. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-19* variable.c (rb_set_class_path): do not set path ifmatz
* lib/cgi.rb (CGI::QueryExtension): give extended string, not a delegater object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-18* class.c, error.c, file.c, io.c, numeric.c, object.c, re.c, struct.c,nobu
time.c: marked init_copy functions nodoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-12Add explicit line breaks in method signatures for ri. Fixup some comments in ↵dave
object.c. Support changes comments for "in xxx.c" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-10* configure.in: install rdoc by default. if you do not want tomatz
install rdoc, specify --disable-install-doc. * eval.c (eval): need to add message delimiter. [ruby-dev:22561] * defines.h (__NeXT__): Ensure that all standard S_IRUSR, S_IWGRP, S_IRWXO, etc. macros are defined since future code might require them (even though present code only requires a subset). * defines.h (__NeXT__): Bug fix: WORDS_BIGENDIAN was not being set correctly on Rhapsody when -arch compiler flag was used (via configure's --enable-fat-binary option). * ext/socket/socket.c (make_hostent): getaddrinfo(3) on BSD do not fill ai_canonname if serv is not supplied. (ruby-bugs PR#1243) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-08* eval.c, object.c, process.c, re.c: don't use C++ style comments.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-02Finish documenting internal stuff. See Changelog for other detailsdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-28RDoc Struct and randomdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-28Add RDoc documentation for stuff in object.cdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-27RDoc comments for Symboldave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-22* class.c (rb_mod_init_copy): always copy singleton class.nobu
[ruby-dev:22325] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-21* class.c (rb_check_inheritable): new function. [ruby-dev:22316]nobu
* intern.h: add prototype. * eval.c (superclass): use rb_check_inheritable(). * object.c (rb_class_initialize): check argument validity. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-21Add file.c comments (and necessary support in parse_c.rb)dave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-19Document Class and Dirdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-05* eval.c (rb_exec_end_proc): should not clear end_procs andmatz
ephemeral_end_procs before execution. [ruby-dev:22144] * eval.c (rb_obj_extend): call Module#extended hook after extended_object. [ruby-list:38866] * object.c (Init_Object): Module#extended defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-13* object.c (rb_class_s_alloc): add function prototype to avoid VC++eban
warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-06* eval.c (rb_call0): update ruby_class as well as ruby_cref.matz
(ruby-bugs-ja PR#540) * eval.c (rb_yield_0): remove ruby_frame->cbase and unify to ruby_cref. [ruby-talk:78141] * eval.c: initialize /* OK */ variables by Qnil to stop warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24* gcc -Wall clean-up.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-22* variable.c (rb_mod_const_missing): new method. [ruby-core:00441]matz
* variable.c (rb_const_get_at): allow "const_missing" hook. * variable.c (rb_const_get_0): ditto. * eval.c (method_missing): rename from rb_undefined to clarify. * eval.c (ruby_finalize_0): update exit status if any of END proc raises SystemExit. [ruby-core:01256] * eval.c (rb_exec_end_proc): reduce rb_protect(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-21* numeric.c (num_equal): should not use rb_equal().matz
* object.c (rb_equal): back out the last change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-21* string.c (rb_str_equal): should return nil for non stringmatz
operand to conform comparable convention. [ruby-dev:20759] * object.c (rb_equal): preserve nil if "==" returns nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-09* eval.c (rb_load): put rb_load_file() in a thread criticalmatz
section. [ruby-dev:20490] * eval.c (compile): put rb_compile_string() in a thread critical section. * variable.c (rb_const_get_0): should not warn if constant is not defined. (ruby-bugs-ja PR#509) * bignum.c (rb_big2dbl): give a warning on overflow. (ruby-bugs-ja PR#510) * util.c (ruby_strtod): change MDMAXEXPT from 511 to 308. * pack.c (utf8_to_uv): long is sufficient. LONG_LONG is not required. * bignum.c (rb_big2str): support 32 bit (without `long long' type) machines. (ruby-bugs-ja PR#512) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-01* class.c (rb_define_class, rb_define_module): also set constant undernobu
Object. [ruby-dev:20445] * object.c (boot_defclass): ditto. * variable.c (rb_const_get_at, rb_const_get_0, rb_mod_const_at, rb_const_defined, mod_av_set, rb_const_assign): toplevel constants are now under Object, rb_class_tbl remains for GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-21* object.c (str_to_id): check for empty string before intern.matz
[ruby-talk:74006] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-21* object.c (rb_to_id): use rb_str_intern() instead of rb_intern()nobu
directly, for sanity check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-26* eval.c (Init_Proc): Block/Proc separation. [huge change]matz
* eval.c (block_arity): returns exact arity number for Procs out of methods. also gives 1 for {|a|..}. * string.c (rb_str_match): revert use of String#index for invocation like string =~ string. * eval.c (rb_Array): move Object#to_a exclusion hack from splat_value(). need to be in eval.c for a while. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-22* object.c (rb_obj_clone): defer copying freezing state aftermatz
calling initialize_copy(). [ruby-dev:20276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-20* object.c (init_copy): call initialize_copy at the end of copymatz
process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-19* object.c (rb_mod_cmp): stupid comparison fixed.matz
* io.c (Init_IO): ARGF.path added (alias to ARGF.filename). [ruby-dev:20197] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-19* object.c (init_copy): rename copy_object as initialize_copy,matz
since it works as copy constructor. * eval.c (rb_add_method): initialize_copy should always be private, like initialize. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-16* object.c (rb_class_allocate_instance): singleton class checkmatz
moved to rb_obj_alloc(). (ruby-bugs-ja PR#345) * re.c (rb_reg_quote): should escape white space characters, \t, \f, \n, \r. (ruby-bugs-ja PR#231) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-15* object.c (rb_mod_le): returns nil if two classes/modules are notmatz
in class-superclass relationship. * object.c (rb_mod_cmp): uses new rb_mod_le() behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-06* object.c (rb_obj_methods): list singleton methods if recurmatz
argument is false; list all methods otherwise. * numeric.c (num_step): double epsilon to make "1.1.step(1.5,0.1)" to work. * ext/gdbm/gdbm.c (fgdbm_values_at): new method to replace select(index..). * ext/sdbm/init.c (fsdbm_values_at): ditto. * ext/dbm/dbm.c (fdbm_values_at): ditto. * ext/dbm/dbm.c (DBM::VERSION): defined. * ext/gdbm/testgdbm.rb: replace select with values_at. * ext/sdbm/testsdbm.rb: ditto. * ext/dbm/testdbm.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-04* array.c (rb_ary_values_at): new method to replace select(index..).matz
* hash.c (rb_hash_values_at,env_values_at): ditto. * re.c (match_values_at): ditto. * struct.c (rb_struct_values_at): ditto. * re.c (match_select): add iterator behavior. * ext/curses/curses.c, ext/digest/sha2/sha2.c, ext/iconv/iconv.c, ext/racc/cparse/cparse.c: include "ruby.h" at the top to shut up "_FILE_OFFSET_BITS redefined" warning on Solaris. * class.c (rb_class_protected_instance_methods): now gives warnings to show migration path. The default will be reversed on Jan 2004. * numeric.c (num_step): "1.1.step(1.5,0.1)" to work. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-02* string.c (rb_str_ljust): now takes optional argument to specifymatz
pad string. [ruby-talk:70482] * string.c (rb_str_rjust): ditto. * string.c (rb_str_center): ditto. * string.c (rb_str_justify): utility function. * eval.c (rb_add_method): call singleton_method_added or method_added for every method definition (after ruby_running). [ruby-talk:70471] * array.c (rb_ary_reverse_bang): Array#reverse! should not return nil even for arrays sized less than 2. * io.c (argf_eof): should not block after reading all argument files. (ruby-bugs-ja PR#449) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-09* variable.c (rb_mod_name): search module path if classname is notmatz
set yet. (ruby-bugs-ja PR#424) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-07* ext/socket/socket.c (sock_s_unpack_sockaddr_in): remove structmatz
size check. getnameinfo(3) can handle. [ruby-dev:19967] * io.c (io_read): do not call rb_sys_fail() when required data length is zero. (ruby-bugs-ja PR#420) * eval.c (umethod_proc): should raise TypeError, instead of returning error causing Proc. Following the principle of "fail early". [ruby-core:00927] * pack.c (pack_pack): small but serious typo. * eval.c (backtrace): skip internal allocator frame. (ruby-bugs-ja PR#416) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-29* eval.c (avalue_to_svalue): use rb_check_array_type() again.matz
Clarify how "to_ary" and "to_a" work. [ruby-talk:68155] * eval.c (svalue_to_avalue): ditto. * eval.c (svalue_to_mrhs): ditto. * eval.c (rb_eval): unary splat to use to_a, but we need a hack to exclude Object#to_a until it's removed. * object.c (rb_Array): check obj.respond_to?("to_a"). Currently all object respond_to "to_a", but Object#to_a will be removed. * range.c (Init_Range): undefine to_ary. * re.c (Init_Regexp): ditto. * regex.c (re_compile_pattern): do not warn if "-" is at the top or last of character class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-25* io.c (rb_io_initialize): should check rb_secure(4).matz
* dir.c (dir_s_getwd): should check rb_secure(4). * object.c (rb_obj_infect): function version of OBJ_INFECT(). * eval.c (rb_secure_update): new function to check object update. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-24security enhancement of dl library (need test).matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-10* array.c (rb_ary_to_a): return value should be an Array if thematz
receiver is an instance of subclass of Array. * string.c (rb_str_to_s): return value should be a String if the receiver is an instance of subclass of String. * eval.c (rb_call): calls method_missing when superclass method does not exist. * eval.c (rb_f_missing): now handles "no super" case. * object.c (rb_obj_ivar_get): Object#instance_variable_get: new method to get instance variable value without eval(). [new] * object.c (rb_obj_ivar_set): Object#instance_variable_set: new method to set instance variable value without eval(). [new] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-03* object.c (Init_Object): default Object#=== now calls "=="matz
internally. * re.c (rb_reg_initialize_m): should honor option status of original regexp. * array.c (rb_ary_equal): ary2 should be T_ARRAY (no to_ary conversion). * array.c (rb_ary_eql): ditto. * string.c (rb_str_equal): str2 should be T_STRING (no to_str conversion). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-31* variable.c (rb_obj_classname): new function.matz
* string.c (rb_str_dup): should preserve original's class (but not hidden singleton class). * string.c (rb_str_substr): ditto. * parse.y: backout EXPR_CMDARG removal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-16Updated Copyrights of Matz to 2003.michal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-21* array.c (ary_alloc), dir.c (dir_s_alloc), eval.c (thgroup_s_alloc),usa
file.c (rb_stat_s_alloc), hash.c (hash_alloc), io.c (io_alloc), object.c (rb_module_s_alloc, rb_class_allocate_instance), re.c (match_alloc, rb_reg_s_alloc), string.c (str_alloc), time.c (time_s_alloc), ext/digest/digest.c (rb_digest_base_alloc), ext/tcltklib/tcltklib.c (ip_alloc), ext/win32ole/win32ole.c (fole_s_allocate, fev_s_allocate) : add prototype to get rid of VC++ warnings. * ext/sdbm/init.c (fsdbm_alloc): allocator takes only one argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-20* object.c (Init_Object): should not remove Class#allocate.matz
* lib/profiler.rb: separate profiling functions, without trace_func and at_exit setting. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-20* parse.y (do_block): split "do" block and tLBRACE_ARG block.matz
* parse.y (cmd_brace_block): new tLBRACE_ARG block rule * parse.y (command): can take optional cmd_brace_block; use %prec to resolve shift/reduce conflict. (ruby-bugs-ja PR#372) * eval.c (ruby_finalize): trace_func should be cleared here (after executing exit procs and finalizers). * eval.c (rb_define_alloc_func): new allocation framework, based on Nobu's work [ruby-dev:19116]. "allocate" method is no longer used for object allocation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19* numeric.c (num_step): use DBL_EPSILON.matz
* array.c (rb_check_array_type): new function: return an array (convert if possible), or nil. * string.c (rb_check_string_type): new function: return a string (convert if possible), or nil. * numeric.c (rb_dbl_cmp): returns nil if values are not comparable. * numeric.c (fix_cmp,flo_cmp): use rb_num_coerce_cmp() * bignum.c (rb_big_cmp): ditto. * numeric.c (rb_num_coerce_cmp): new coercing function for "<=>", which does not raise TypeError. * numeric.c (do_coerce): can be supress exception now. * object.c (rb_mod_cmp): should return nil for non class/module objects. * re.c (rb_reg_eqq): return false if the argument is not a string. now returns boolean value. * class.c (rb_include_module): argument should be T_MODULE, not T_class, nor T_ICLASS. * eval.c (is_defined): "defined?" should return "assignment" for attribute assignment (e.g. a.foo=b) and indexed assignment (e.g. a[2] = 44). * parse.y (aryset): use NODE_ATTRASGN. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e