aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
Commit message (Collapse)AuthorAgeFilesLines
* * eval.c (rb_call_super): should call method_missing if super ismatz2005-11-011-5/+9
| | | | | | | | | | | | | | | | | | | | | | | called from Kernel method. * eval.c (exec_under): frame during eval should preserve external information. * configure.in: use proper option for Sun linker. A patch from Shinya Kuwamura <kuwa@labs.fujitsu.com>. [ruby-dev:27603] * numeric.c (fix_rshift): RDoc fix. [ruby-core:6351] * util.h (strtod): add #undef for platforms defines strtod() macro. [ruby-dev:27563] * ext/etc/etc.c: document update from mathew <meta@pobox.com>. [ruby-core:06473] * ext/fcntl/fcntl.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bin/erb (ERB::Main::run): typo fixed. [ruby-core:06337]matz2005-10-211-49/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * env.h: move struct METHOD and struct BLOCK from eval.c to support NodeWrap and ParseTree. * rubysig.h (CHECK_INTS): prevent signal handler to run during critical section. [ruby-core:04039] * eval.c (load_wait): need not to call rb_thread_schedule() explicitly. [ruby-core:04039] * eval.c (rb_thread_schedule): clear rb_thread_critical. [ruby-core:04039] * eval.c (rb_obj_instance_exec): create instance_exec and module_exec which pass arguments to the block. * eval.c (rb_f_funcall): rename fcall to funcall to follow tradition. * st.c (st_free_table): do not call free() but xfree(). [ruby-core:06205] * eval.c (splat_value): call rb_Array() to convert svalue to values. [ruby-dev:27397] * lib/cgi.rb (CGI::Cookie::parse): Cookies from Nokia devices may not be parsed correctly. A patch from August Z. Flatby (augustzf) in [ruby-Patches-2595]. [ruby-core:06183] * object.c (rb_Array): Array() to raise error for objects without to_ary, nor to_a. * object.c (nil_to_a): revert NilClass#to_a. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c, eval.c, hash.c, st.c, variable.c: changed /* ??? */ stuffocean2005-10-201-8/+8
| | | | | | | protoize generated to ANYARGS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c, file.c, ruby.c: removed strchr, strrchr, strstr definitionocean2005-10-201-8/+4
| | | | | | | | | because they are defined in missing.h. * missing.h, missing/strchr.c, missing/strstr.c: ANSI styled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c, eval.c, gc.c, parse.y, regparse.c, sjis.c, time.c:nobu2005-10-181-1/+1
| | | | | | | made internal symbols static. [ruby-dev:27435] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_obj_respond_to): check if obj responds to the givennobu2005-10-111-9/+17
| | | | | | | | | method with the given visibility. [ruby-dev:27408] * eval.c (rb_respond_to): conform to Object#respond_to?. [ruby-dev:27411] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c, enum.c, eval.c, util.c: safer function pointer usage.nobu2005-10-111-3/+1
| | | | | | | | | | fixed: [ruby-core:06143] * util.h (qsort): removed the definition incompatible to ANSI. fixed: [ruby-core:06147] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (Init_Binding): add Binding#dup method. [yarv-dev:666]nobu2005-10-081-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * range.c (rb_range_beg_len): should return Qfalse for non-rangematz2005-10-051-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | object. * pack.c (EXTEND16): [ruby-dev:27383] * eval.c (set_trace_func): add rb_secure(4) to prevent adding tracing function. * lib/delegate.rb: document update from James Edward Gray II <james@grayproductions.net>. [ruby-core:05942] * process.c (proc_daemon): should restrict execution on levels higher than $SAFE=2. suggested by URABE Shyouhei <shyouhei@ice.uec.ac.jp>. * lib/forwardable.rb: replaced by new implementation from <Daniel.Berger@qwest.com>. [ruby-core:05899] * file.c (path_check_0): disallow sticky world writable directory in PATH (and $LOAD_PATH). [ruby-dev:27226] * numeric.c (fix_idiv): 1.div(1.0) should return integer value. [ruby-dev:27235] * lib/yaml.rb: require 'yaml/constants'. [ruby-core:5776] * lib/xmlrpc/client.rb (XMLRPC::Client::do_rpc): add charset information to content-type header.[ruby-core:5127] * lib/xmlrpc/server.rb (CGIServer::serve): ditto. * lib/xmlrpc/server.rb (ModRubyServer::serve): ditto. * lib/xmlrpc/server.rb (WEBrickServlet::service): ditto. * test/dbm/test_dbm.rb (TestDBM::test_s_open_error): remove test_s_open_error test to detect duplicate open. [ruby-dev:27202] * eval.c (splat_value): use to_a to splat non Array object. * object.c (nil_to_a): remove nil.to_a. [experimental] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * evalc. (rb_f_send): underscores need to be escaped.nobu2005-09-281-1/+1
| | | | | | | fixed by Doug Kearns. [ruby-core:06053] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ev_const_get), variable.c (rb_const_get_0): retry only whennobu2005-09-281-1/+1
| | | | | | | | | | autoload succeeded. * variable.c (rb_autoload_load): now return true if autoload succeeded. fixed: [ruby-dev:27331] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (thread_mark): mark th->last_status. [ruby-dev:27179]akr2005-09-201-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c: changed `foo (*bar)_((boo))' to `foo (*bar)(boo)`.ocean2005-09-141-6/+6
| | | | | | | | * enumerator.c, eval.c, gc.c, intern.h, io.c, process.c, ruby.c, ruby.h, signal.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c: changed `foo _((boo))' to `foo(boo)`. [ruby-dev:27056]ocean2005-09-141-59/+59
| | | | | | | | | | | * defines.h, dir.c, dln.h, enumerator.c, env.h, error.c, eval.c, file.c, gc.c, hash.c, inits.c, intern.h, io.c, lex.c, marshal.c, missing.h, node.h, numeric.c, pack.c, process.c, re.h, ruby.c, ruby.h, rubyio.h, rubysig.h, signal.c, sprintf.c, st.h, string.c, struct.c, time.c, util.c, util.h, variable.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (BEGIN_CALLARGS): pop halfly pushed status.nobu2005-09-131-1/+3
| | | | | | | fixed: [ruby-dev:26881] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (proc_save_safe_level): no need to restrict safe levelmatz2005-09-121-5/+3
| | | | | | | memoize in $SAFE>=3. [ruby-dev:27050] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/ruby/trunk@8726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix indent.akr2005-07-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/ruby/trunk@8695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e