summaryrefslogtreecommitdiff
path: root/object.c
AgeCommit message (Collapse)Author
2008-01-16* load.c (rb_feature_p): get rid of unlimited alloca.nobu
* object.c (rb_cstr_to_dbl): ditto. * io.c (mode_enc): fixed uninitialized variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06* $Date$ keyword removed to avoid inclusion of locale dependentakr
string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24enable several rdoc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-18* compile.c, insnhelper.ci, insns.def, object.c, vm.c, vm.h:ko1
optimize !@, != method invocation. * id.c, id.h: ditto. * bootstraptest/test_syntax.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-18* object.c (rb_obj_freeze): preserve frozen state of immediatematz
values in internal hash table, a la generic_ivar. * object.c (rb_obj_frozen_p): check immediate values too. * variable.c (generic_ivar_set): add frozen check fro immediate values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-18* parse.y (op_tbl): remove duplication to avoid symbol aliases.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-11* object.c (Init_Object): singleton_method_{added,removed,undefined}matz
hooks should be defined for BasicObject. [ruby-dev:32531] * eval.c (Init_eval): method_missing should be defined for all objects; moved to BasicObject. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-09* object.c (rb_obj_not_match): wrong test.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-09* parse.y (expr): redefinable not (!) operator.matz
* parse.y (arg): ditto. * object.c (rb_obj_not): new method "!". * object.c (rb_obj_not_equal): new method "!=". * object.c (rb_obj_not_match): new method "!~". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01* insns.def (concatarray, splatarray): use to_a instead ofmatz
to_splat. * insnhelper.ci (caller_setup_args): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20* object.c (nil_plus): remove unused function. [ruby-core:13737]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19* object.c (rb_class_superclass): should not raise exception formatz
BasicObject. [ruby-Bugs-15668] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-13* include/ruby/ruby.h: introduce 2 macros:ko1
RFLOAT_VALUE(v), DOUBLE2NUM(dbl). Rename RFloat#value -> RFloat#double_value. Do not touch RFloat#double_value directly. * bignum.c, insns.def, marshal.c, math.c, numeric.c, object.c, pack.c, parse.y, process.c, random.c, sprintf.c, string.c, time.c: apply above changes. * ext/dl/mkcallback.rb, ext/json/ext/generator/generator.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-08* object.c: improve docs for Object.tapdavidflanagan
* ChangeLog: fix bogus dates on my previous entries git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-11* include/ruby/node.h (NOEX_LOCAL): remove unused local visibility.matz
* class.c (ins_methods_push): ditto. * class.c (rb_class_local_methods): method removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-29* variable.c (rb_ivar_set): fix class instance variable.akr
* object.c (rb_class_real): cl argument may be 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-29* object.c (rb_class_real): use BUILTIN_TYPE instead of TYPE.akr
access flags directly intead of FL_TEST. they are enough because cl argument is a class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-28* include/ruby/intern.h: export rb_ivar_foreach.akr
* include/ruby/ruby.h: modify struct RObject and RClass for optimizing T_OBJECT space. [ruby-dev:31853] (ROBJECT_LEN, ROBJECT_PTR) (RCLASS_IV_TBL, RCLASS_M_TBL, RCLASS_SUPER, RCLASS_IV_INDEX_TBL) (RMODULE_IV_TBL, RMODULE_M_TBL, RMODULE_SUPER): abstract accessor defined. * variable.c: support the modified RObject and RClass. * object.c: ditto. * class.c: ditto. * gc.c: ditto. * marshal.c: ditto. * eval_method.ci: use the abstract accessor. * insns.def: ditto. * proc.c: ditto. * struct.c: ditto. * eval.c: ditto. * error.c: ditto. * vm.c: ditto. * insnhelper.ci: ditto. * ext/digest/digest.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25* encoding.c: provide basic features for M17N.matz
* parse.y: encoding aware parsing. * parse.y (pragma_encoding): encoding specification pragma. * parse.y (rb_intern3): encoding specified symbols. * string.c (rb_str_length): length based on characters. for older behavior, bytesize method added. * string.c (rb_str_index_m): index based on characters. rindex as well. * string.c (succ_char): encoding aware succeeding string. * string.c (rb_str_reverse): reverse based on characters. * string.c (rb_str_inspect): encoding aware string description. * string.c (rb_str_upcase_bang): encoding aware case conversion. downcase, capitalize, swapcase as well. * string.c (rb_str_tr_bang): tr based on characters. delete, squeeze, tr_s, count as well. * string.c (rb_str_split_m): split based on characters. * string.c (rb_str_each_line): encoding aware each_line. * string.c (rb_str_each_char): added. iteration based on characters. * string.c (rb_str_strip_bang): encoding aware whitespace stripping. lstrip, rstrip as well. * string.c (rb_str_justify): encoding aware justifying (ljust, rjust, center). * string.c (str_encoding): get encoding attribute from a string. * re.c (rb_reg_initialize): encoding aware regular expression * sprintf.c (rb_str_format): formatting (i.e. length count) based on characters. * io.c (rb_io_getc): getc to return one-character string. for older behavior, getbyte method added. * ext/stringio/stringio.c (strio_getc): ditto. * io.c (rb_io_ungetc): allow pushing arbitrary string at the current reading point. * ext/stringio/stringio.c (strio_ungetc): ditto. * ext/strscan/strscan.c: encoding support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-12* blockinlining.c: remove "yarv" prefix.ko1
* array.c, numeric.c: ditto. * insnhelper.ci, insns.def, vm_evalbody.ci: ditto. * yarvcore.c: removed. * yarvcore.h: renamed to core.h. * cont.c, debug.c, error.c, process.c, signal.c : ditto. * ext/probeprofiler/probeprofiler.c: ditto. * id.c, id.h: added. * inits.c: ditto. * compile.c: rename internal functions. * compile.h: fix debug flag. * eval.c, object.c, vm.c: remove ruby_top_self. use rb_vm_top_self() instead. * eval_intern.h, eval_load: ditto. * gc.c: rename yarv_machine_stack_mark() to rb_gc_mark_machine_stack(). * insnhelper.h: remove unused macros. * iseq.c: add iseq_compile() to create iseq object from source string. * proc.c: rename a internal function. * template/insns.inc.tmpl: remove YARV prefix. * thread.c: * vm.c (rb_iseq_eval): added. * vm.c: move some functions from yarvcore.c. * vm_dump.c: fix to remove compiler warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10* include/ruby: moved public headers.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-03* object.c (instance_variable_get): Restore rdoc markups lost inknu
the last commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-01* object.c (rb_obj_ivar_set): RDoc updated according to amatz
suggestion from Brian Candler <B.Candler AT pobox.com>. [ruby-core:10469] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-23* parse.y, compile.c, gc.c, insns.def, intern.h, iseq.c, node.h,matz
object.c, string.c, variable.c, vm_macro.def: revert private instance variable feature, which is postponed until next major release. * marshal.c: TYPE_SYMBOL2 removed; MARSHAL_MINOR reverted back to 8th version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-16* object.c (rb_obj_ivar_set/get/defined): fix to check :@_v/C id.ko1
* test/testunit/test_testcase.rb: fix to use instance_variable_get() to access @_result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-07* this commit is a result of refactoring. only renaming functions,ko1
moving definitions place, add/remove prototypes, deleting unused variables and removing yarv.h. This commit doesn't change any behavior of ruby/vm. * yarv.h, common.mk: remove yarv.h (contents are moved to yarvcore.h). * error.c, eval_intern.h: include yarvcore.h instead yarv.h * rename some functions: * debug.[ch]: debug_*() -> ruby_debug_*() * iseq.c: iseq_*() -> rb_iseq_*(), ruby_iseq_disasm() * iseq.c: node_name() -> ruby_node_name() * vm.c: yarv_check_redefinition_opt_method() -> rb_vm_check_redefinition_opt_method() * some refactoring with checking -Wall. * array.c: remove rb_ary_ptr() (unused) and remove unused local variables. * object.c: add a prototype of rb_mod_module_exec(). * eval_intern.h (ruby_cref): set it inline. * eval_load.c (rb_load), yarvcore.c: yarv_load() -> rb_load_internal(). * parse.y: add a prototype of rb_parse_in_eval() (in eval.c). * process.c: add a prototype of rb_thread_stop_timer_thread() (in thread.c). * thread.c: remove raw_gets() function (unused) and fix some format mismatch (format mismatchs have remained yet. this is todo). * thread.c (rb_thread_wait_fd_rw): fix typo on label name. * thread_pthread.ci: comment out codes with USE_THREAD_CACHE. * vm.c (rb_svar, rb_backref_get, rb_backref_get, rb_lastline_get, rb_lastline_set) : moved from yarvcore.c. * vm.c (yarv_init_redefined_flag): add a prototype and rename yarv_opt_method_table to vm_opt_method_table. * vm.c (rb_thread_eval): moved from yarvcore.c. * yarvcore.c: remove unused global variables and fix to use nsdr(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-02* variable.c (rb_cvar_set): remove warn argument.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11611 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
2006-12-28* lib/cgi.rb (CGI::Cookie::initialize): use Array() again.matz
[ruby-core:09781] * object.c (rb_Array): returns 1-element array if the argument does not have to_ary nor to_a. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-04* intern.h, object.c, variable.c (rb_mod_constants): added an optionalnobu
flag to search ancestors, which is defaulted to true, as well as const_defined? and const_get. [ruby-dev:29989] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-11-22* object.c (rb_obj_tap): a new method. [ruby-talk:224013]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-11-06* eval.c (svalue_to_avalue): need to splat but no error.matz
* eval.c: new macros - YIELD_CALL, YIELD_VALUES. * eval.c (rb_yield_values): specify YIELD_VALUES. * eval.c (rb_yield_0): use new macros. * eval.c (proc_invoke): slightly modified to separate YIELD_CALL and YIELD_VALUES from YIELD_ARY_ARGS. * object.c (Init_Object): add nil.to_splat => []. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-13* object.c: Class#inherited RDoc added. a patch from Danielmatz
Berger <djberg96 at gmail.com> [ruby-core:08942] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-12* object.c (rb_mod_cvar_defined): wrong id check. a patch frommatz
Mauricio Fernandez <mfp at acm.org>. [ruby-core:09158] * object.c (rb_mod_cvar_get): typo fixed. [ruby-core:09168] * object.c (rb_mod_cvar_set): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-07* object.c (rb_mod_initialize): since module_eval no longer passesnobu
self, use module_exec instead. fixed: [ruby-dev:29637] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-22* hash.c (rb_hash_eql): new method to be used by Hash.matz
* hash.c (rb_hash_hash): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-18* object.c (rb_obj_ivar_defined, rb_mod_cvar_defined): new methods,nobu
Kernel#instance_variable_defined? and Module#class_variable_defined?. [ruby-dev:29587] * lib/date/format.rb (Date::Bag#method_missing): use new method, instance_variable_defined? to check if an instance variable is defined. fixed: [ruby-dev:29554] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-18* dir.c (dir_s_glob): remove unused variable.matz
* math.c (math_log): ditto. * re.c (rb_reg_regcomp): ditto. * eval.c (break_jump): ditto. * eval.c (rb_thread_yield_0): remove unused function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-07* object.c (nil_to_s): returns the empty string again.matz
[ruby-dev:29520] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02* object.c (Init_Object): move symbol related code to string.cmatz
* string.c (Init_String): Symbol as subclass of String. * parse.y (rb_intern2): handle symbol as strings. * string.c (str_new): substring of symbols are mere strings, not symbols. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02* ruby.h (struct RArray): embed small arrays.matz
(RARRAY_LEN): defined for accessing array members. (RARRAY_PTR): ditto. * array.c: use RARRAY_LEN and RARRAY_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31* eval.c (search_required): use RSTRING_PTR and RSTRING_STR.usa
* object.c (nil_plus): ditto. * ext/dl/cptr.c (rb_dlptr_s_to_ptr): ditto. * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31* ruby.h (struct RString): embed small strings.matz
(RSTRING_LEN): defined for accessing string members. (RSTRING_PTR): ditto. * string.c: use RSTRING_LEN and RSTRING_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-30* object.c (rb_Integer): Integer(nil) should raise TypeError.matz
[ruby-talk:210205] * object.c (nil_to_s): no longer returns empty string but "nil". [ruby-talk:210205] * lib/mkmf.rb: avoid COMMON_HEADERS being nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-25* object.c (sym_call): check if the receiver is given.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-13ansificated.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-21* object.c (rb_cstr_to_dbl): "9_e8" should consider "_e8" asmatz
trailing garbage so that it should return 9.0. [ruby-dev:29088] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-20* object.c (rb_mod_attr): make Module#attr to be an alias tomatz
attr_reader. [RCR#331] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-18* object.c (rb_cstr_to_dbl): limit out-of-range message.nobu
* util.c (ruby_strtod): return end pointer even if ERANGE occurred. fixed: [ruby-dev:29041] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-28* object.c (rb_cstr_to_dbl): underscores should appear onlymatz
between digits. [ruby-dev:28891] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e