summaryrefslogtreecommitdiff
path: root/eval.c
AgeCommit message (Collapse)Author
2004-10-24* eval.c (get_backtrace): ignore illegal backtrace. [ruby-dev:24587]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-23* eval.c (rb_load, search_required, rb_require_safe, rb_require): usenobu
frozen shared string to avoid outside modification. [ruby-dev:24580] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-22* eval.c (rb_alias): was warning for wrong condition.matz
[ruby-dev:24565] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-21* ext/zlib/zlib.c (zstream_shift_buffer): should restore classmatz
field of a buffer. [ruby-dev:24562] * eval.c (rb_alias): should warn on method discarding. [ruby-dev:24546] * ext/zlib/zlib.c (zstream_expand_buffer_into): hide internal string buffer by clearing klass. [ruby-dev:24548] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-20* parse.y (lex_getline): should update ruby_debug_lines.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-20rdocnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-19* array.c (rb_ary_times): Array#* should return an instance ofmatz
the class of right operand. [ruby-dev:24526] * ext/zlib/zlib.c (zstream_detach_buffer): should not expose class-less object to Ruby world. [ruby-dev:24530] * eval.c (proc_dup): provide Proc#dup as well. [ruby-talk:116915] * eval.c (ruby_exec): stack marking position may be higher than expected. thanks to Guy Decoux. [ruby-core:03527] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-19* eval.c (search_required): required name must not be changed beforenobu
loading. [ruby-dev:24492] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-19* eval.c (rb_require_safe): provide the feature after loaded.nobu
[ruby-list:40085] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-19* io.c (read_all): block string buffer modification duringmatz
rb_io_fread() by freezing it temporarily. [ruby-dev:24479] * dir.c (rb_push_glob): block call at once the end of method. [ruby-dev:24487] * ext/enumerator/enumerator.c (enum_each_slice): remove rb_gc_force_recycle() to prevent potential SEGV. [ruby-dev:24499] * ext/zlib/zlib.c (zstream_expand_buffer): hide internal string buffer by clearing klass. [ruby-dev:24510] * ext/socket/socket.c (sock_s_getservbyaname): protocol string might be altered. [ruby-dev:24503] * string.c (rb_str_upto): check if return value from succ is a string. [ruby-dev:24504] * io.c (rb_io_popen): get mode string via rb_io_flags_mode() to avoid mode string modification. [ruby-dev:24454] * io.c (rb_io_getline_fast): should take delim as unsigned char to distinguish EOF and '\377'. [ruby-dev:24460] * io.c (rb_io_getline): add check for RS modification. [ruby-dev:24461] * enum.c (enum_sort_by): use qsort() directly instead using rb_iterate(). [ruby-dev:24462] * enum.c (enum_each_with_index): remove rb_gc_force_recycle() to prevent access to recycled object (via continuation for example). [ruby-dev:24463] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-18* string.c (rb_str_upto): method result must be checked. [ruby-dev:24504]nobu
* eval.c (error_print): ditto. [ruby-dev:24519] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-15eval.c (Init_stack): make prototype declaration consistent with the ↵akr
definition in gc.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-06* io.c (rb_io_mode_flags): preserve append mode flag.matz
[ruby-dev:24436] * io.c (rb_io_modenum_mode): do not use external output buffer. * string.c (rb_str_justify): differ pointer retrieval to prevent padding string modification. [ruby-dev:24434] * range.c (range_each_func): allow func to terminate loop by returning RANGE_EACH_BREAK. * range.c (member_i): use RANGE_EACH_BREAK. [ruby-talk:114959] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-02* string.c (rb_str_sum): should use bignums when bits is greatermatz
than or equals to sizeof(long)*CHAR_BITS. [ruby-dev:24395] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-01* string.c (rb_str_sum): string may be altered. [ruby-dev:24381]matz
* eval.c (rb_f_eval): defer pointer retrieval to prevent unsafe sourcefile string modification. [ruby-dev:24373] * io.c (io_read): block string buffer modification during rb_io_fread() by freezing it temporarily. [ruby-dev:24366] * io.c (rb_io_s_popen): mode argument may be altered. [ruby-dev:24375] * file.c (rb_file_s_basename): ext argument may be altered. [ruby-dev:24377] * enum.c (enum_sort_by): use NODE instead of 2 element arrays. [ruby-dev:24378] * string.c (rb_str_chomp_bang): StringValue() may change the receiver. [ruby-dev:24371] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-27* eval.c (rb_call0): invoke finalizers periodically.nobu
* gc.c (gc_sweep): defer running finalizers. * gc.c (rb_gc_finalize_deferred): run deferred finalizers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-24* struct.c (rb_struct_s_members): wrong call of struct_members.matz
[ruby-dev:24333] * eval.c (proc_invoke): propagate DVAR_DONT_RECYCLE on termination to avoid double call to rb_gc_force_recycle(). [ruby-dev:24311] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-24* parse.y (rb_parser_append_print): should handle prelude.matz
[llama@u01.gate0] * parse.y (rb_parser_while_loop): ditto. * array.c (rb_ary_subseq): original object might be modified after sharing data creation. [ruby-dev:24327] * array.c (rb_ary_replace): ditto. * array.c (ary_make_shared): freeze shared array. [ruby-dev:24325] * struct.c (struct_members): always check struct size and size of members list in the class. [ruby-dev:24320] * string.c (rb_str_sub_bang): check if string is not modified during iteration. [ruby-dev:24315] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-23* eval.c: remove debug print.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-23* eval.c: remove debug print.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-23* hash.c (rb_hash_rehash): replace st_foreach() by its deepmatz
checking counterpart. [ruby-dev:24310] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-22* parse.y: remove global variables ruby_eval_tree andmatz
ruby_eval_tree_begin. * array.c (rb_ary_collect_bang): element size might change during comparison. [ruby-dev:24300] * array.c (rb_ary_reject_bang): ditto. [ruby-dev:24300] * array.c (rb_ary_eql): ditto. [ruby-dev:24300] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-21* enum.c (enum_sort_by): do not use qsort directly. usematz
rb_ary_sort_bang() instead. [ruby-dev:24291] * enum.c (enum_sort_by): pedantic type check added. [ruby-dev:24291] * hash.c (rb_hash_foreach_iter): check iter_lev after each iteration. [ruby-dev:24289] * array.c (rb_ary_and): element size might change during comparison. [ruby-dev:24290] * array.c (rb_ary_or): ditto. [ruby-dev:24292] * array.c (rb_ary_equal): wrong fix. [ruby-dev:24286] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-13* eval.c (blk_copy_prev): need frame_dup(). [ruby-dev:24103]eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-06* eval.c (cvar_cbase): singletons should refer outer cvar scope.matz
[ruby-dev:24223] * eval.c (rb_load): should preserve previous ruby_wrapper value. [ruby-dev:24226] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-03* eval.c (cvar_cbase): class variables cause SEGV inmatz
instance_eval() for fixnums and symbols. [ruby-dev:24213] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-03* struct.c (make_struct): remove redefining constant whenmatz
conflict. [ruby-dev:24210] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-28* bignum.c (rb_big_and): protect parameters from GC.matz
[ruby-talk:110664] * error.c (exc_equal): exceptions are equal if they share same class, message and backtrace. [ruby-talk:110354] * error.c (name_err_mesg_equal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-25Must learn how to transpose words in Emacs. Sorry...dave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-25Minor fix to error messagedave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-25* eval.c (rb_longjmp): Exception#to_str is no longer defined.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-19* dir.c (free_dir): fix memory leak. reported by yamamotomatz
madoka. * eval.c (bind_eval): new method. [RCR 251] * string.c (rb_str_clear): new method. [ruby-dev:24104] * io.c (rb_io_reopen): should clear allocated OpenFile. pointed out by Guy Decoux. [ruby-core:03288] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-18* eval.c (rb_obj_instance_eval): evaluates under special singletonnobu
classes as for special constants. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-02* eval.c (blk_free): fixed serious memory leak. [ruby-dev:24013]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-31* eval.c (is_defined): stupid mistakes fixed. [ruby-dev:24006]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-31* eval.c (is_defined): avoid unnecessary method invocations.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-30* eval.c (is_defined): call is_defined() before invokingmatz
rb_eval(). [ruby-talk:107867] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-28* eval.c (rb_call0): should call rb_call_super() directly formatz
visibility overriding. [ruby-dev:23989] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-28* env.h: remove argv from ruby_frame.matz
* eval.c (rb_eval): no more copy on write. * eval.c (assign): ditto. * eval.c (rb_call0): can receive *rest by specifying negative argc. (-1 means 0 arg and *rest, -2 means 1 arg and *rest...) * eval.c (rb_call0): properly set frame's argc counter. * gc.c (rb_gc_mark_frame): need not to mark frame's argv * gc.c (run_final): wrong order of data. [ruby-dev:23948] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-27* eval.c (rb_call0): update ruby_frame->argv with the defaultmatz
value used for the optional arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-27* eval.c (rb_eval): copy on write for argument local variablematz
assignment. * eval.c (assign): ditto. * eval.c (rb_call0): update ruby_frame->argv with the default value used for the optional arguments. * object.c (Init_Object): "===" calls rb_obj_equal() directly. [ruby-list:39937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-23* gc.c (define_final): should not disclose NODE* to Ruby world.matz
[ruby-dev:23957] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-17* eval.c (THREAD_ALLOC): th->thread should be initialized to NULL.matz
[ruby-talk:106657] The solution was found by Guy Decoux. * file.c (rb_stat_dev_major): new methods File::Stat#dev_major and #dev_minor. [ruby-core:03195] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-09* eval.c (rb_thread_raise): accept third argument as well asnobu
Kernel#raise, and evaluate the arguments to create an exception in the caller's context. [ruby-talk:105507] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-05* eval.c (rb_thread_yield, rb_f_catch): 4th argument to rb_yield_0()nobu
is a set of bit flags. [ruby-dev:23859] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-29* eval.c (rb_eval_cmd, rb_thread_trap_eval): restore safe level.nobu
* gc.c (define_final, run_final): preserve and restore safe level for finalizers. [ruby-core:03058] * signal.c (signal_exec, rb_trap_exit, trap): preserve and restore safe level for signal handlers. [ruby-dev:23829] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-22* eval.c (return_jump, break_jump): raise unexpceted local jumpnobu
exception directly. [ruby-dev:23740] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-19* eval.c (proc_set_safe_level, proc_invoke, rb_mod_define_method): notnobu
set $SAFE for methods defined from Proc. [ruby-dev:23697] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-19* eval.c (method_call): allow changing $SAFE. [ruby-dev:23713]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-18* eval.c (eval): adjust indent.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e