summaryrefslogtreecommitdiff
path: root/eval.c
AgeCommit message (Collapse)Author
2003-07-28* ext/stringio/stringio.c (strio_gets): only "gets" should set $_.matz
* ext/stringio/stringio.c (strio_getline): should not set $_ here. * io.c (argf_to_s): argf.to_s returns "ARGF". * io.c (set_defout_var, set_deferr_var): make $defout and $deferr obsolete. * io.c (set_input_var, set_output_var): allow $stdin, $stdout, $stderr not to be instance of IO. * io.c (rb_f_readline): forward method to current_file. gets, readline, readlines, getc, readchar, tell, seek, pos=, rewind, fileno, to_io, eof, each_line, each_byte, binmode, and closed? as well. * io.c (argf_forward): utility function to forward method to current_file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-26* variable.c (rb_mod_const_missing): "const_missing" should notmatz
appear in the caller(); add call frame adjustment. * eval.c (rb_method_missing): simplify call frame adjustment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-25* ext/socket/socket.c (tcp_s_gethostbyname): was usingmatz
uninitialized size_t value. [ruby-talk:76946] * Minor cleanups. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4156 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-24* configure.in (AC_C_VOLATILE): check if volatile works.nobu
* defines.h (volatile): removed. * eval.c (rb_thread_group): Thread#group. [new] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24* eval.c (thgroup_add): no warning for terminated threads.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4142 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-19* lib/xmlrpc: import.matz
* eval.c (thgroup_add): should return group for terminated thread case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-19* eval.c (thgroup_add): typo again. sorry.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-19* eval.c (thgroup_add): typo.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-19* eval.c (thgroup_add): do not raise ThreadError on terminatedmatz
thread addition for compatibility. just warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-18* eval.c (rb_attr): extra calls of method_added. [ruby-talk:76361]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-18* eval.c (rb_f_missing): VCALL is called only for LOCAL_ID. nomatz
check required. * parse.y (primary): pritmary:tFID generates NODE_FCALL. [ruby-dev:20641] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-17* eval.c (rb_clear_cache_by_class): check both klass and origin.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-17* eval.c (ruby_init): set ruby_running to true aftermatz
initialization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-16* eval.c (rb_proc_new): call svalue_to_avalue for yield argument.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-16* eval.c (rb_disable_super, rb_enable_super): deprecate.matz
* eval.c (thgroup_s_alloc): re-implement group struct. * eval.c (thgroup_add): add check for enclose and frozen status. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-15* eval.c (rb_add_method, rb_alias): need to clear cache bynobu
ID when method defined in parent class is cached for grand child classes. [ruby-dev:20672] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-11*** empty log message ***nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-11* eval.c (avalue_to_svalue): typo.nobu
* eval.c (rb_load): rb_prohibit_interrupt should not underflow. * parse.y (NODE_STRTERM, tokadd_string, parse_string): moved string nest level from a static variable to NODE_STRTERM. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-10* eval.c (rb_thread_schedule): parse error.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4053 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-07* eval.c (rb_call_super): k->super maybe NULL if klass is Kernel.matz
[ruby-dev:20519] * gc.c (obj_free): clear method cache when freeing class/module. * eval.c (rb_mod_remove_method): allow "remove_method" to accept multiple arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-04* node.h (NEW_NODE): cast arguments to rb_node_newnode().matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-03* array.c (rb_values_at): extract common procedure frommatz
rb_ary_values_at. follow DRY principle. * re.c (match_values_at): values_at should understand ranges. * struct.c (rb_struct_values_at): ditto. * struct.c (inspect_struct): inspect format changed; add "struct " at the top. * sprintf.c (rb_f_sprintf): "%p" specifier for inspect output. (RCR#68) * eval.c (rb_mod_undef_method): allow "undef_method" to accept multiple arguments. (RCR#146) * lib/timeout.rb: put timeout in Timeout module. (RCR#121) [ruby-talk:61028] * re.c (match_groups): new method added. (RCR#139) * variable.c (rb_mod_const_of): should exclude constant defined in Object, unless retrieving constants of Object. * string.c (rb_str_new4): do not allocate new string if original is frozen or already have copy-on-write entry. [ruby-talk:74940] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-02* string.c (rb_str_shared_replace): clear flags before copy.matz
* string.c (rb_str_replace): ditto. * eval.c (rb_yield_0): override visibility mode for module_eval etc. (ruby-bugs-ja PR#505) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-30* eval.c (mnew): ignore metaclasses have no influence, for rklass.nobu
[ruby-talk:74706] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-28* configure.in (rb_cv_stack_grow_dir): check stack growing direction.nobu
* eval.c (rb_thread_restore_context): prior configuration macro. * gc.c (ruby_stack_length): always return the address of lower edge. * gc.c (rb_gc_mark_locations): remove margin. [ruby-dev:20462] * gc.c (rb_gc, Init_stack): prior configuration macro. * gc.c (Init_stack): add safety margin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-24* eval.c (rb_yield_0): show yielded block position not only yieldingnobu
point. [ruby-dev:20441] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-23* dir.c (find_dirsep): get rid of warnings.nobu
* eval.c (error_print): temporary value might be disposed by GC. * hash.c (env_has_value, env_index): should not increment NULL. * io.c (io_read, rb_io_sysread): not read when length is 0. * io.c (rb_io_reopen): ensure initialized IO. * io.c (rb_io_init_copy): sychronize file pointer. * io.c (rb_io_s_pipe): make exception proof. * string.c (rb_str_rindex_m): Fixnum 0 matched end of string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-23* string.c (rb_str_upto): generate sequence according to "succ"matz
order. formerly check was done by dictionary order. [ruby-talk:74138] * string.c (rb_string_value): fill constant empty string along with setting ELTS_SHARED if str->ptr is NULL. [ruby-core:01179] * string.c (rb_string_value_ptr): ditto. * string.c (rb_check_string_type): ditto. * string.c (str_gsub): move END(0) check before mbclen2(). * string.c (scan_once): reduce END(0) check. * io.c (rb_io_initialize): accept fixnum mode. * eval.c (error_print): replace strchr() by memchr(), einfo may contain "\0". * pack.c (pack_unpack): range check for "@" move; initialize check for "m". * error.c (syserr_initialize): avoid buffer overflow. * file.c (rb_file_s_readlink): expand buffer until readlink succeed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-21* eval.c (proc_invoke): forgot "break";matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-21* eval.c (proc_invoke): should not propagate distination tag ifmatz
tag is already handled in this level. (ruby-bugs-ja PR#501) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-20* eval.c (proc_invoke): should not propagate TAG_BREAK andmatz
TAG_RETURN from orphan Proc object. [ruby-core:01148] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-20* parse.y (new_yield): distinguish "yield 1,2" and "yield [1,2]".matz
[ruby-dev:20360] * eval.c (rb_eval): support new_yield() change. * variable.c (rb_const_get_0): warn for Foo::BAR when BAR is a toplevel constant (i.e. a constant defined under Object). [ruby-list:36935] * parse.y (no_blockarg): separate no block argument check and ret_args argument processing. * range.c (rb_range_beg_len): out_of_range check after adjusting end point. [ruby-dev:20370] * parse.y (call_args): the first argument to arg_cancat() should be NODE_LIST. [ruby-core:01151] * eval.c (rb_eval): should dispatch based on ID type. * eval.c (rb_yield_0): should restore scope_vmode during yield. [ruby-dev:20361] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-17* eval.c: remove rb_cBlock.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-16* eval.c (proc_invoke): format the message for localjump_error().nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-16* eval.c (proc_alloc): re-unification of Block and Proc. Blockmatz
class is no longer available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-14* eval.c (method_arity): should handle NODE_BMETHOD andmatz
NODE_DMETHOD. [ruby-core:01138] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-07* parse.y (value_expr0): class and module statements should not bematz
warned for "void value expression". [ruby-talk:72989] * gc.c (add_final): should determine type by respond_to? * gc.c (define_final): ditto. * io.c (rb_io_ctl): should not depend on respond_to? * range.c (range_step): rb_check_string_type(). * process.c (proc_setgroups): new functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-06* eval.c (error_print): needs to be exception proof.nobu
* eval.c (error_handle, rb_longjmp): bails out when exception reentered. (ruby-bugs-ja:PR#487), [ruby-core:01119], [ruby-core:01122] * eval.c (Init_Proc): pre-allocates critical error objects. * parse.y (cmd_brace_block, do_block, brace_block): initialize block variables at the beginning of the block. [ruby-talk:72521] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-06* gc.c (define_final): eliminate rb_f_lambda() call.matz
* class.c (rb_scan_args): ditto. * signal.c (sig_trap): ditto. * hash.c (rb_hash_initialize): ditto. * variable.c (rb_f_trace_var): ditto. * ext/dl/dl.c (rb_dl_callback): ditto. * ext/win32ole/win32ole.c (ev_on_event): ditto. * eval.c (ruby_cleanup): $SAFE is turned off in the finalization. Each END proc should preserve its own $SAFE level. [ruby-core:01119] * marshal.c (marshal_load): remove unused variable "hash". [ruby-core:01120] * hash.c (env_str_new): freeze strings from ENV. [ruby-talk:72860] * array.c (rb_ary_first): optional argument to retrieve first n elements. * array.c (rb_ary_last): optional argument to retrieve last n elements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-06* eval.c (ruby_cleanup): $SAFE is turned off in the finalization.matz
Each END proc should preserve its own $SAFE level. [ruby-core:01119] * marshal.c (marshal_load): remove unused variable "hash". [ruby-core:01120] * hash.c (env_str_new): freeze strings from ENV. [ruby-talk:72860] * array.c (rb_ary_first): optional argument to retrieve first n elements. * array.c (rb_ary_last): optional argument to retrieve last n elements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-05* math.c (math_erf,math_erfc): new function. [ruby-list:37753]matz
* eval.c (ruby_finalize): no longer need to turn off $DEBUG in the finalizer. (ruby-bugs-ja PR#473) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-03* eval.c (rb_call_super): should search superclass method based onmatz
orig_func, not last_func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-03* eval.c (rb_call): typo.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-03* eval.c (rb_call_super): inheritance line adjustment moved frommatz
rb_call(). [ruby-core:01113] * eval.c (rb_eval): use rb_call_super() to follow DRY principle. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-02* array.c (push_values_at): Array#values_at should work withmatz
ranges too. * range.c (rb_range_beg_len): length calculation was wrong. * eval.c (rb_call): should set T_ICLASS in the frame->last_class. [ruby-core:01110] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-30* io.c (rb_f_syscall): type dispatch should be based onmatz
rb_check_string_type(), not FIXNUM_P(), because values may be a bignum. [ruby-talk:72257] * eval.c (rb_call0): should pass the current klass value to block_invoke, which may be called via "super". [ruby-core:01077] * eval.c (block_invoke): now takes 4th argument "klass". * eval.c (block_alloc): should propagate BLOCK_PROC to ruby_block. * marshal.c (r_object0): should not use "yield" method, use "call" instead. (ruby-bugs-ja PR#476) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-30* eval.c (rb_Array): exclude Kernel#to_a instead of Object#to_a.nobu
(ruby-bugs-ja:PR#483) * lib/optparse.rb (OptionParser::Switch#parse_arg): not splat. * lib/optparse.rb (OptionParser::Switch#conv_arg): splat if no conversion supplied. * lib/optparse.rb (OptionParser::Switch::PlacedArgument#parse): override next switch after argument conversion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e