aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
Commit message (Collapse)AuthorAgeFilesLines
* * eval.c (mark_frame_adj): need to adjust argv pointer if usingmatz2003-09-051-4/+23
| | | | | | | | | | | | system's alloca. [ruby-core:01503] * io.c (rb_f_gets): should call next_argv() before type check current_file. [ruby-list:38336] * eval.c (proc_invoke): should retrieve retval when pcall is true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): should not handle exceptions within rescuenobu2003-09-021-1/+5
| | | | | | | argument. [ruby-talk:80804] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): make tail recursion in ELSE clause ofnobu2003-09-011-2/+2
| | | | | | | RESCUE a jump. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (aref_args): forgot to call NEW_SPLAT(). reported bymatz2003-09-011-0/+1
| | | | | | | | | | Dave Butcher. * eval.c (Init_Thread): protect thgroup_default. suggested by Guy Decoux in [ruby-talk:80623] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_thread_switch): add RESTORE_EXIT; exit by anothernobu2003-09-011-14/+28
| | | | | | | | | | | thread termination. * eval.c (rb_thread_start_0): should not error_print() within terminated thread, because $stderr used by it might be overriden now. [ruby-dev:21280] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (TAG_DST()): take no argument.eban2003-08-311-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_iter_break): should not call TAG_JUMP directly.matz2003-08-301-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (struct BLOCK): remove BLOCKTAG, use scope instead.matz2003-08-301-214/+129
| | | | | | | | | | | | | | | | | | | | | * eval.c (POP_TAG): no longer propagate retval. retval is now set directly by localjump_destination(). * eval.c (localjump_destination): new function to cast return/break local jump. * eval.c (rb_yield_0): stop TAG_RETURN/TAG_BREAK escaping. * variable.c (rb_autoload_load): call const_missing if autoloading constant is not defined to allow hook. * eval.c (rb_eval): use rb_const_get_from() instead of rb_const_get_at(). * eval.c (is_defined): forgot to check NODE_COLON3. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): *a = [1,2] now assigns [[1,2]] to a.matz2003-08-271-12/+6
| | | | | | | | | | | | | consistent with *a = [1], which set [[1]] to a. * node.h: merge NODE_RESTARY to NODE_SPLAT. * parse.y: rules simplified a bit by removing NODE_RESTARY. * sample/test.rb: updated for new assignment behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_s_expand_path): avoid calling rb_scan_args() formatz2003-08-231-5/+2
| | | | | | | apparent cases. [ruby-talk:79748] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval, rb_iterate, block_pass): reduce PUSH/POP_TAG andnobu2003-08-231-44/+50
| | | | | | | EXEC_TAG() for retry. [ruby-dev:21216] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_yield_splat): should check if "values" is array.matz2003-08-231-4/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (each_with_index_i): typo.matz2003-08-221-0/+1
| | | | | | | | * eval.c (rb_yield_splat): should call svalue_to_avalue() before calling rb_yield_0(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval.c: typomatz2003-08-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (inject_i): use rb_yield_values.matz2003-08-221-4/+14
| | | | | | | | | | | * enum.c (each_with_index_i): ditto. * eval.c (rb_yield_splat): new function to call "yield *values". * string.c (rb_str_scan): use rb_yield_splat(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (block_pass): improve passing current block.nobu2003-08-211-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (id2ref): recycle check should be done by klass == 0.matz2003-08-141-0/+1
| | | | | | | | | | | | | | | | | | | [ruby-core:01408] * eval.c (Init_Thread): Continuation#[] added. [ruby-talk:79028] * parse.y (mlhs_node): should allow "::Foo" (colon3) as lhs. * parse.y (lhs): ditto. * parse.y (yylex): should return tCOLON3 right after kCLASS. [ruby-talk:78918] * error.c (exc_initialize): was converting argument to string too eagerly. Only check was needed. [ruby-talk:78958] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (POP_BLOCK): turn on BLOCK_LEFT flag when leaving block.matz2003-08-131-4/+9
| | | | | | | | * eval.c (proc_invoke): unpack return/break destination when block is already left. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (THREAD_SAVE_CONTEXT): should explicitly turn off thematz2003-08-111-2/+19
| | | | | | | flag before calling getcontext(2). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_thread_restore_context): typo.matz2003-08-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (struct thread): add member to save backing store onmatz2003-08-111-4/+51
| | | | | | | | | | | | | | | | | IA64. (ruby-bugs PR1086) * eval.c (thread_mark): mark IA64 backing store region. * eval.c (thread_free): free saved IA64 backing store. * eval.c (rb_thread_save_context): save IA64 backing store as well. * eval.c (rb_thread_restore_context): restore IA64 backing store. * eval.c (THREAD_ALLOC): initialize IA64 members. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call_super): do not use rb_block_given_p() formatz2003-08-111-3/+5
| | | | | | | | | check. [ruby-talk:78656] * eval.c (BEGIN_CALLARGS): push ITER_NOT only when ITER_PRE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_at_exit): should not be called without a block.matz2003-08-071-22/+14
| | | | | | | block_given check added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): forgot to pop ruby_class.matz2003-08-061-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): update ruby_class as well as ruby_cref.matz2003-08-061-37/+38
| | | | | | | | | | | | (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
* * eval.c (rb_load): should preserve current source file/line.nobu2003-08-051-0/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (method_proc): should specify YIELD_FUNC_SVALUE.matz2003-08-041-2/+1
| | | | | | | | | | [ruby-dev:21107] * marshal.c (w_object): should not call w_extended for USRMARSHAL dump. [ruby-dev:21106] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call_super): should propagate previous block fornobu2003-08-031-1/+1
| | | | | | | super call. [ruby-talk:77884] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (call_trace_func): clear exception flag temporarily.nobu2003-08-031-10/+8
| | | | | | | [ruby-dev:21090] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_yield_0): code clean up according to Nobu's patch.matz2003-08-011-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c (rb_obj_singleton_methods): should not go up tomatz2003-08-011-2/+6
| | | | | | | | | | | | | | ancestors unless the recursive flag is set. [ruby-list:38007] * hash.c (env_each_key): use env_keys to avoid environment modify on the fly. * hash.c (env_each_value): use env_values for safety. * hash.c (env_each): allocate environment array first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call_super): propagate previous block if a block isnobu2003-08-011-1/+1
| | | | | | | given. [ruby-talk:77577] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* backoff eval.c 1.498matz2003-08-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (BEGIN_CALLARGS): should not always reset ruby_iter,matz2003-08-011-1/+1
| | | | | | | | | | | | | | | | | | | need to restore previous value. [ruby-talk:77577] * array.c (rb_ary_fill): array length may be changed during the block execution. [ruby-talk:77579] * array.c (rb_ary_zip): ditto. * array.c (rb_ary_fill): ditto. * hash.c (env_reject_bang): length may be changed during the block execution. * hash.c (env_clear): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_gets): only "gets" should set $_.matz2003-07-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | * 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
* * variable.c (rb_mod_const_missing): "const_missing" should notmatz2003-07-261-6/+4
| | | | | | | | | 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
* * ext/socket/socket.c (tcp_s_gethostbyname): was usingmatz2003-07-251-7/+7
| | | | | | | | | 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
* * gcc -Wall clean-up.matz2003-07-241-9/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (AC_C_VOLATILE): check if volatile works.nobu2003-07-241-0/+12
| | | | | | | | | * 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
* * eval.c (thgroup_add): no warning for terminated threads.matz2003-07-241-3/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c (rb_mod_const_missing): new method. [ruby-core:00441]matz2003-07-221-17/+39
| | | | | | | | | | | | | | | | * 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
* * lib/xmlrpc: import.matz2003-07-191-1/+1
| | | | | | | | * 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
* * eval.c (thgroup_add): typo again. sorry.matz2003-07-191-8/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (thgroup_add): typo.matz2003-07-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (thgroup_add): do not raise ThreadError on terminatedmatz2003-07-191-3/+4
| | | | | | | thread addition for compatibility. just warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_attr): extra calls of method_added. [ruby-talk:76361]nobu2003-07-181-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_missing): VCALL is called only for LOCAL_ID. nomatz2003-07-181-6/+2
| | | | | | | | | | 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
* * eval.c (rb_clear_cache_by_class): check both klass and origin.matz2003-07-171-17/+24
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ruby_init): set ruby_running to true aftermatz2003-07-171-2/+1
| | | | | | | initialization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_proc_new): call svalue_to_avalue for yield argument.matz2003-07-161-1/+23
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e