summaryrefslogtreecommitdiffstats
path: root/eval.c
Commit message (Collapse)AuthorAgeFilesLines
* * dln.c: avoid warning of const to non-const convertion.ocean2005-09-121-5/+5
| | | | | | | | | [ruby-dev:27041] * eval.c, io.c, ruby.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: moved to ANSI function style from K&R function style.ocean2005-09-121-964/+389
| | | | | | | | | | | | | | | | | (used protoize on windows, so still K&R remains on #ifdef part of other platforms. And `foo _((boo))' stuff is still there) [ruby-dev:26975] * bignum.c, class.c, compar.c, dir.c, dln.c, dmyext.c, enum.c, enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c, main.c, marshal.c, math.c, numeric.c, object.c, pack.c, prec.c, process.c, random.c, range.c, re.c, regcomp.c, regenc.c, regerror.c, regexec.c, regparse.c, regparse.h, ruby.c, signal.c, sprintf.c, st.c, string.c, struct.c, time.c, util.h, variable.c, version.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: protoize.matz2005-09-101-13/+27
| | | | | | | | * eval.c (splat_value): simpler and consistent array conversion for argument splat. [yarv-dev:599] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_thread_switch): convert all exceptions tonobu2005-09-071-0/+4
| | | | | | | | | | SystemExit. fixed: [ruby-core:05724] * eval.c (rb_thread_terminated): show backtrace before propagate exceptions to main thread. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/observer.rb: a patch from nornagon <nornagon@gmail.com>matz2005-09-051-13/+51
| | | | | | | | | | | merged to allow arbitrary names for update methods. [ruby-core:05416] * eval.c (rb_f_fcall): new method to avoid inefficiency of obj.instance_eval{send(...)} tricks. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): wrong condition for $SAFE restoration.matz2005-09-011-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_rescue2): intialization miss. fixed: [ruby-dev:26917]nobu2005-08-301-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_send): do not call private methods if the receivermatz2005-08-301-2/+6
| | | | | | | is specified. [ruby-talk:153672] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (terminate_process): take String message.nobu2005-08-171-10/+9
| | | | | | | | * eval.c (rb_thread_switch): propagate the exception caused thread termination directly. fixed: [ruby-core:05552] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_add_method): preserve safe level in the environmentmatz2005-08-161-24/+21
| | | | | | | | | | | | | | | | | | | where a method is defined . * eval.c (rb_call0): restore preserved safe level in the method execution. * parse.y (lambda): need separate block variable stack manipulation and lpar_beg maintenance. based on a patch found in [ruby-core:05551] from Mauricio Fernandez <mfp@acm.org>. * parse.y (parser_yylex): adjust lpar_beg after tLAMBEG and kDO_LAMBDA. [ruby-core:05551] * parse.y (yycompile): remove unreachable code. [yarv-dev:570] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_mod_autoload_p, rb_f_autoload_p): added rdoc.nobu2005-08-161-6/+21
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_rescue2): reduce PUSH_TAG() as well as NODE_RESCUE.nobu2005-08-141-21/+16
| | | | | | | | | [ruby-dev:26800] * range.c (range_check, range_init): reduce uselse exceptions. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_block_pass): distinguish current block from others.nobu2005-08-131-1/+3
| | | | | | | fixed: [ruby-dev:26274] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (formal_assign): let default values overridenobu2005-08-091-5/+11
| | | | | | | arguments to zsuper. fixed: [ruby-dev:26743] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_block_arg), eval.c (rb_yield_0): deal with dynamicnobu2005-08-081-7/+7
| | | | | | | variable lambda arguments. [ruby-core:05540] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (assign): deal with new block argument.nobu2005-08-081-1/+8
| | | | | | | | | | fixed: [ruby-core:05536] * eval.c (rb_node_arity): follow change of NODE_ARGS. fixed: [ruby-dev:26761] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (return_jump): fix "can't across thread" error messagematz2005-08-051-1/+1
| | | | | | | | when no thread associated. http://www.namikilab.tuat.ac.jp/~sasada/diary/200507.html#d31 git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (formal_assign): returns position of rest arguments variable.nobu2005-08-041-7/+7
| | | | | | | | * parse.y (f_rest_arg): use anonymous variable for rest arguments. fixed: [ruby-dev:26647] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (Init_Enumerator): provided features should havenobu2005-08-041-12/+11
| | | | | | | | | | | | | extensions. * eval.c (rb_feature_p): returns type of the feature instead of extension. * eval.c (search_required): ruby library should be prior to statically linked extentions. fixed: [ruby-dev:26711] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_yield_0): push yielded node instead of yielding.nobu2005-07-291-0/+1
| | | | | | | fixed: [yarv-dev:549] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): fix calling zsuper from a method with anonymousnobu2005-07-291-2/+2
| | | | | | | rest argument. [ruby-dev:26639] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (lambda): Perl6 style -> lambda expression. [NEW]matz2005-07-271-70/+106
| | | | | | | | | | | | | | | | | | | | | | | [VERY EXPERIMENTAL] * gc.c (id2ref): must not assign pointers to long int. use LONG_LONG instead if SIZEOF_LONG < SIZEOF_VOIDP. [ruby-talk:149645] * ruby.h: use LONG_LONG to simplify the change. [ruby-talk:149645] * dir.c (dir_each): rewinddir(3) before iteration. [ruby-talk:149628] * eval.c (rb_f_throw): replace all '0x%lx' by '%p'. [ruby-talk:149553] * missing/vsnprintf.c (BSD_vfprintf): '%p' need to handle 64bit size pointer. [ruby-talk:149553] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_fd_select): the all three fd_sets must be long enough fornobu2005-07-231-3/+23
| | | | | | | select. fixed: [ruby-talk:149059] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * sprintf.c (rb_vsprintf, rb_sprintf): new functions return new String,nobu2005-07-231-26/+14
| | | | | | | | | using missing/vsnprintf.c. [ruby-dev:26580] * missing/vsnprintf.c: made the output changeable. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (syserr_initialize): add 1 byte for snprintf() size formatz2005-07-191-3/+3
| | | | | | | NUL at the end. [ruby-dev:26574] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (syserr_initialize): need to allocate an additional bytematz2005-07-191-1/+1
| | | | | | | for NUL at the end. [ruby-dev:26574] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * signal.c (trap): remove sigexit(); handle "EXIT" via sig_exec().matz2005-07-191-7/+12
| | | | | | | | | | [ruby-dev:26440] * io.c (rb_io_inspect): replace sprintf() with "%s" format all over the place by snprintf() to avoid integer overflow. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): make the pointer to NODE volatileocean2005-07-181-1/+1
| | | | | | | instead of NODE itself. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): make body volatile to avoid possible optimizationakr2005-07-181-1/+1
| | | | | | | | problem. [ruby-dev:26195] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c, intern.h (rb_proc_call, rb_obj_method, rb_method_call):nobu2005-07-111-11/+10
| | | | | | | | | | export. * ext/enumerator/enumerator.c (enumerator_with_index): [EXPERIMENTAL] added a new method Enumerator#with_index. [ruby-talk:147728] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_thread_save_context): must not switch contexts duringnobu2005-07-051-1/+3
| | | | | | | re-allocating stack. fixed: [ruby-core:05219] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix indent.akr2005-07-021-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * defines.h (FLUSH_REGISTER_WINDOWS): defined for IA64.akr2005-07-021-0/+10
| | | | | | | | | | | (flush_register_windows): declare flush_register_windows. * eval.c (flush_register_windows): new function. * ruby.h (NOINLINE): move up to be effective in defines.h. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: check select_large_fdset.akr2005-07-021-0/+10
| | | | | | | | * eval.c: use select_large_fdset to support large file descriptors on Solaris. [ruby-dev:26404] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): pre-evaluate argument for unambiguousmatz2005-06-301-3/+5
| | | | | | | | | | | | | | evaluation order. [ruby-dev:26383] * lib/delegate.rb (Delegator::method_missing): forward unknown method to the destination. suggested by <christophe.poucet@gmail.com>. [ruby-talk:146776] * process.c (detach_process_watcher): terminate process watcher thread right after rb_waitpid() succeed. [ruby-talk:146430] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c, eval.c, parse.y, process.c, ruby.c: avoid warning "unusedocean2005-06-281-10/+5
| | | | | | | | | | | | variable" [ruby-dev:26387] * dir.c (glob_helper): avoid warning "enumeration value `RECURSIVE' not handled in switch" [ruby-dev:26392] (patch from Kazuhiro NISHIYAMA) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (FUNCTION_CALL_MAY_RETURN_TWICE): DUMMY_SETJMP is replacedakr2005-06-201-11/+29
| | | | | | | | because setjmp is not enough to fix getcontext and SPARC register window problem. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * signal.c (sigexit): call rb_thread_signal_exit() instead ofmatz2005-06-121-4/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rb_exit(). [ruby-dev:26347] * eval.c (rb_thread_signal_exit): a new function to exit on main thread. * eval.c (rb_thread_switch): exit status should be retrieved from ruby_errinfo. * eval.c (rb_f_exit): ensure exit(0) should call exit(EXIT_SUCCESS). * missing/mkdir.c: remove. [ruby-core:05177] * hash.c (env_aset): do not treat nil as key-removing value. [ruby-list:40865] * parse.y (method_call): allow aref expression ([]) to take a block. * parse.y (block_dup_check): a function to check duplication of a block argument and an actual block. * lib/delegate.rb (SimpleDelegator::__setobj__): need check for recursive delegation. [ruby-core:04940] * lib/cgi.rb: add underscore aliases CGI::escape_html, CGI::unescape_html, CGI::escape_element, CGI::unescape_element. [ruby-core:05058] * misc/ruby-mode.el (ruby-expr-beg): fix looking point drift. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_gc_mark_threads): curr_thread may not be part of theakr2005-06-121-2/+2
| | | | | | | | thread list. [ruby-dev:26312] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (unknown_node): show more information. [ruby-dev:26196]akr2005-06-101-1/+9
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ruby_longjmp): new macro to call longjmp, setcontext, etc.akr2005-06-091-16/+43
| | | | | | | | | | | | (ruby_setjmp): new macro to call setjmp, getcontext, etc. (ruby_setjmp): call setjmp before getcontext to avoid IA64 register stack problem. [ruby-talk:144939] * gc.c (Init_stack): remove IA64_MAGIC_STACK_LIMIT. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in, eval.c, gc.c: use libunwind only on HP-UX.akr2005-06-091-3/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_min_by, enum_max_by): return nil if no iteration.nobu2005-06-071-5/+11
| | | | | | | | | | | fixed: [ruby-dev:26245] * eval.c (rb_need_block): ensure a block is given. * eval.c (backtrace): skip successive frames sharing same node. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * intern.h (rb_fdset_t): deal with fd bit sets over FD_SETSIZE.nobu2005-06-031-24/+148
| | | | | | | | | | | | | | | | fixed: [ruby-dev:26187] * eval.c (rb_fd_init, rb_fd_term, rb_fd_zero, rb_fd_set, rb_fd_clr, rb_fd_isset, rb_fd_copy): ditto. * io.c (rb_io_wait_readable, rb_io_wait_writable, rb_f_select): ditto. * ext/io/wait/wait.c (io_wait): ditto. * ext/socket/socket.c (wait_connectable, unix_recv_io): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vms/vmsruby_private.c, vms/vmsruby_private.h: private routinesnobu2005-05-251-0/+6
| | | | | | | | | for VMS port are added. * eval.c (ruby_init): change to call VMS private intialization routine. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c (glob_helper): get rid of using String. [ruby-dev:26180]nobu2005-05-181-8/+0
| | | | | | | | * eval.c (ruby_options), win32/win32.c (NtInitialize): move argument intialization back. [ruby-dev:26180] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (unknown_node): add volatile directive to prototype.nobu2005-05-131-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (unknown_node): ignore broken NODE to get rid of accessingnobu2005-05-111-2/+11
| | | | | | | | possibly inaccessible address. fixed: [ruby-dev:26122] should emit more useful information like [ruby-dev:26126], though. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (break_jump): break should not cross functions.matz2005-05-111-0/+3
| | | | | | | [ruby-list:40818] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (TMP_ALLOC): use macro NEW_NODE() to get rid of warnings onnobu2005-05-101-2/+2
| | | | | | | platforms which have no alloca(). fixed: [ruby-talk:141301] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e