aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
Commit message (Collapse)AuthorAgeFilesLines
* * ext/etc/etc.c: add new functions: setpwent, getpwent, endpwent,matz2003-10-011-2/+2
| | | | | | | | | | | | setgrent, getgrent, endgrent. * ext/socket/socket.c (sock_s_gethostbyname): do not reverse lookup. * Makefile.in: copy lex.c from $(srcdir) if it's not the current directory. [ruby-dev:21437] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_load): Object scope had priority over required filenobu2003-10-011-1/+0
| | | | | | | scope. [ruby-dev:21415] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): while/until should not capture break unlessmatz2003-09-301-4/+10
| | | | | | | they are destination of the break. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_thread_atfork): wrong format specifier.matz2003-09-291-1/+1
| | | | | | | | | [ruby-dev:21428] * process.c (pst_inspect): better description. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (rb_warn_m): should not warn if -W0 is specified.matz2003-09-241-0/+1
| | | | | | | | | | [ruby-talk:82675] * util.c (ruby_strtod): skip preceding zeros before counting digits in the mantissa. (ruby-bugs PR#1181) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (proc_invoke): should push PROT_PCALL tag for orphans.matz2003-09-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (proc_invoke): should update "result" for orphans.matz2003-09-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (localjump_destination): should not raise ThreadErrormatz2003-09-171-7/+6
| | | | | | | | | | exception for "break". [ruby-dev:21348] * eval.c (proc_invoke): use result instead of prot_tag->retval. retval is no longer propagated to the ancestors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * intern.h (rb_disable_super, rb_enable_super): replace with dummynobu2003-09-121-0/+3
| | | | | | | | expressions instead of prototypes. the functions remain yet for binary compatibility. [ruby-talk:81758] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_big_and): convert argument using 'to_int'.matz2003-09-121-4/+15
| | | | | | | | | | | | | | | * bignum.c (rb_big_or): ditto. * bignum.c (rb_big_xor): ditto. * eval.c (rb_f_require): allow "require" on $SAFE>0, if feature name is not tainted. * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::stream): Supports StringIO. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (win32_get_exception_list): avoid VC7 warning.usa2003-09-101-0/+4
| | | | | | | [ruby-win32:577] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (struct tag): dst should be VALUE.nobu2003-09-091-6/+5
| | | | | | | | * eval.c (localjump_destination): stop at the scope where the current block was created. [ruby-dev:21353] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 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