summaryrefslogtreecommitdiff
path: root/eval.c
AgeCommit message (Collapse)Author
2005-03-16* eval.c (rb_call0): call_cfunc() should be protected.shugo
* eval.c (rb_add_event_hook): use K&R style. * eval.c (rb_remove_event_hook): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-16* eval.c (rb_add_event_hook): new function to add a hook function forshugo
interpreter events. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-16* eval.c (rb_call0): reorganize "return" event post.matz
* eval.c (return_jump): no need to post "return" event here. * object.c (str_to_id): raise ArgumentError for NUL containing strings. * parse.y (primary): wrong var node was set for NODE_LAMBDA. [ruby-core:04555] * re.c (make_regexp): need to free internal regexp structure when compilation fails. [ruby-talk:133228] * parse.y (bv_decl): remove initialize rule from block local variable declaration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-15* eval.c (recursive_check, recursive_push): more restrictive check.nobu
fixed: [ruby-dev:25916] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-13* eval.c (recursive_pop): raise TypeError instead of fatal error.nobu
fixed: [ruby-dev:25843] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-08* eval.c (rb_exec_recursive): declaration should precede statementsusa
before C99. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-08* error.c (errno_missing): Errno.const_missing to allow referencesmatz
to SyscallError exceptions not defined on the platform. [ruby-core:04522] * error.c (Init_syserr): Errno::NOERROR(0) for fallback exception. * eval.c (block_pass): should not push unique number if a block is not an orphan. [ruby-dev:25808] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-07* eval.c (rb_require_safe): get actual path string under safe levelnobu
when requested. fixed: [ruby-dev:25815] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-07* object.c (inspect_obj): unintended space removal.matz
[ruby-dev:25810] * eval.c (rb_exec_recursive): should not use NODE in disclosed context. [ruby-dev:25812] * io.c (rb_f_open): need not to check if to_open value is a T_FILE. [ruby-dev:25812] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-05* lib/mkmf.rb (create_makefile): allow putting spaces between targetnobu
and colon in depend file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-04* eval.c (rb_exec_recursive): matched the declaration to prototype.usa
* ext/curses/curses.c: don't need to check HAVE_WCOLOR_SET excluding window_color_set(). * ext/tk/tcltklib.c: fixed commit mistakes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-04* array.c: replace rb_protect_inspect() and rb_inspecting_p() bymatz
rb_exec_recursive() in eval.c. * eval.c (rb_exec_recursive): new function. * array.c (rb_ary_join): use rb_exec_recursive(). * array.c (rb_ary_inspect, rb_ary_hash): ditto. * file.c (rb_file_join): ditto. * hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto. * io.c (rb_io_puts): ditto. * object.c (rb_obj_inspect): ditto * struct.c (rb_struct_inspect): ditto. * lib/set.rb (SortedSet::setup): a hack to shut up warning. [ruby-talk:132866] * lib/time.rb (Time::strptime): add new function. inspired by [ruby-talk:132815]. * lib/parsedate.rb (ParseDate::strptime): ditto. * regparse.c: move st_*_strend() functions from st.c. fixed some potential memory leaks. * exception error messages updated. [ruby-core:04497] * ext/socket/socket.c (Init_socket): add bunch of Socket constants. Patch from Sam Roberts <sroberts@uniserve.com>. [ruby-core:04409] * array.c (rb_ary_s_create): no need for negative argc check. [ruby-core:04463] * array.c (rb_ary_unshift_m): ditto. * lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass of StandardError class, not Exception class. [ruby-core:04429] * parse.y (fcall_gen): lvar(arg) will be evaluated as lvar.call(arg) when lvar is a defined local variable. [new] * object.c (rb_class_initialize): call inherited method before calling initializing block. * eval.c (rb_thread_start_1): initialize newly pushed frame. * lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE. fixed: [ruby-core:04444] * eval.c (is_defined): NODE_IASGN is an assignment. * ext/readline/readline.c (Readline.readline): use rl_outstream and rl_instream. [ruby-dev:25699] * ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check [ruby-dev:25675] * misc/ruby-mode.el: [ruby-core:04415] * lib/rdoc/generators/html_generator.rb: [ruby-core:04412] * lib/rdoc/generators/ri_generator.rb: ditto. * struct.c (make_struct): fixed: [ruby-core:04402] * ext/curses/curses.c (window_color_set): [ruby-core:04393] * ext/socket/socket.c (Init_socket): SO_REUSEPORT added. [ruby-talk:130092] * object.c: [ruby-doc:818] * parse.y (open_args): fix too verbose warnings for the space before argument parentheses. [ruby-dev:25492] * parse.y (parser_yylex): ditto. * parse.y (parser_yylex): the first expression in the parentheses should not be a command. [ruby-dev:25492] * lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330] * object.c (Init_Object): remove Object#type. [ruby-core:04335] * st.c (st_foreach): report success/failure by return value. [ruby-Bugs-1396] * parse.y: forgot to initialize parser struct. [ruby-dev:25492] * parse.y (parser_yylex): no tLABEL on EXPR_BEG. [ruby-talk:127711] * document updates - [ruby-core:04296], [ruby-core:04301], [ruby-core:04302], [ruby-core:04307] * dir.c (rb_push_glob): should work for NUL delimited patterns. * dir.c (rb_glob2): should aware of offset in the pattern. * string.c (rb_str_new4): should propagate taintedness. * env.h: rename member names in struct FRAME; last_func -> callee, orig_func -> this_func, last_class -> this_class. * struct.c (rb_struct_set): use original method name, not callee name, to retrieve member slot. [ruby-core:04268] * time.c (time_strftime): protect from format modification from GC finalizers. * object.c (Init_Object): remove rb_obj_id_obsolete() * eval.c (rb_mod_define_method): incomplete subclass check. [ruby-dev:25464] * gc.c (rb_data_object_alloc): klass may be NULL. [ruby-list:40498] * bignum.c (rb_big_rand): should return positive random number. [ruby-dev:25401] * bignum.c (rb_big_rand): do not use rb_big_modulo to generate random bignums. [ruby-dev:25396] * variable.c (rb_autoload): [ruby-dev:25373] * eval.c (svalue_to_avalue): [ruby-dev:25366] * string.c (rb_str_justify): [ruby-dev:25367] * io.c (rb_f_select): [ruby-dev:25312] * ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072] * struct.c (make_struct): [ruby-dev:25249] * dir.c (dir_open_dir): new function. [ruby-dev:25242] * io.c (rb_f_open): add type check for return value from to_open. * lib/pstore.rb (PStore#transaction): Use the empty content when a file is not found. [ruby-dev:24561] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-02* eval.c (ruby_native_thread_kill): call pthread_kill() to send anagai
signal to ruby's native thread * ruby.h: add definition of ruby_native_thread_kill() * signal.c (sigsend_to_ruby_thread): send the signal to ruby's native thread ([ruby-dev:25744], [ruby-dev:25754]), and set signal mask to the current native thread git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-02* eval.c (rb_eval): [EXPERIMENTAL] NODE_LAMBDA implemented.nobu
[ruby-dev:25780] * node.h (NODE_LAMBDA): for literal Proc object. * parse.y (expr): interpret mere do...end block as proc object. * parse.y (primary): ditto, for brace block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-22* eval.c (rb_thread_start_0): update curr_thread before raisingnobu
TAG_THREAD. [ruby-dev:25712] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-17* eval.c (rb_thread_start_1): initialize newly pushed frame.nobu
fixed: [ruby-dev:25707] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-16* eval.c (rb_thread_start_1): outer block variables wasn't linked tonobu
threads. fixed: [ruby-dev:25700] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-13* eval.c (rb_thread_start_0): restore prot_tag before rewinding.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-12* eval.c (TAG_THREAD): to start a new thread.nobu
* eval.c (ruby_init, ruby_options, ruby_cleanup, rb_protect, rb_load_protect, rb_thread_start_0): make thread anchor. * eval.c (proc_alloc): clone proc object if klass is not Proc or created in different thread. * eval.c (rb_block_pass): call a function with a block. [new] * eval.c (rb_f_throw): raise NameError in main thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-09* eval.c (scope_dup): add volatile not to optimize tbl.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-06* eval.c (stack_extend): add prototype because VC++8 doesn'tusa
accept __declspec(noinline) with K&R style function definitions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-05* eval.c (rb_thread_initialize): Thread objects cannot be initializednobu
again. fixed: [ruby-core:04067] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-16* eval.c (rb_proc_arity, rb_node_arity, rb_mod_method_arity,nobu
rb_obj_method_arity): new functions to obtain method arity. [ruby-dev:25143] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-13* eval.c (Init_eval): should mark ruby_eval_tree. [ruby-dev:25189]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-09* ext/dbm/dbm.c (fdbm_select): [ruby-dev:25132]matz
* ext/sdbm/init.c: ditto. * ext/gdbm/gdbm.c: ditto. * eval.c (proc_invoke): merge Guy Decoux's argument preserve patch in [ruby-core:03874]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-06* process.c (proc_setgroups): [ruby-dev:25081]matz
* re.c (rb_reg_eqq): document fix. [ruby-talk:122541] * io.c (io_fread): take VALUE argument. * ext/socket/socket.c (sock_connect): use rb_str_new4(). [ruby-dev:25052] * eval.c (rb_yield_0): [ruby-dev:25051] * io.c (io_write): remove rb_str_locktmp(). [ruby-dev:25050] * io.c (io_fwrite): takes VALUE string as an argument. [ruby-dev:25050] * ext/socket/socket.c (sock_connect): remove rb_str_locktmp(). [ruby-dev:25050] * ext/socket/socket.c (udp_connect): [ruby-dev:25045] * ext/socket/socket.c (udp_bind): ditto. * ext/socket/socket.c (udp_send): ditto. * ext/socket/socket.c (bsock_send): ditto. * ext/socket/socket.c (s_recvfrom): ditto. * hash.c (rb_hash_hash): should provide "hash" method where "eql?" is redefined. [ruby-talk:122482] * ext/socket/socket.c (bsock_setsockopt): [ruby-dev:25039] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-06* eval.c (run_trap_eval): add prototype for Microsoft compiler.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-03* eval.c (proc_invoke): prepare to pass a block from "call" methodmatz
to a Proc generated by Method#to_proc. [ruby-dev:25031] * eval.c (rb_yield_0): actually passes a block given to "call". * object.c (convert_type): use rb_respond_to() again. this fix is based on [ruby-dev:25021] * eval.c (rb_respond_to): funcall respond_to? if it's redefined. [ruby-dev:25021] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-02* io.c (rb_file_initialize): [ruby-dev:25032]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-02* eval.c (rb_protect): prevent continuations created inside from beingnobu
called from the outside. [ruby-dev:25003] * eval.c (rb_callcc, rb_cont_call): prohibit calling from different signal contexts. [ruby-dev:25022] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-02* eval.c (thread_mark): mark thread group. [ruby-dev:25020]nobu
* eval.c (thgroup_add): check whether the argument is really a Thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-30* signal.c (sighandler): call handler immediately only for defaultmatz
handlers. [ruby-dev:25003] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-30* eval.c (rb_eval): should check previous frame for ZSUPER.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-30* eval.c (PUSH_FRAME): flags should have been initialized.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-30* eval.c (rb_eval): [ruby-core:03856]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-29* object.c (convert_type): [ruby-core:03845]matz
* eval.c (rb_funcall_rescue): new function. * object.c (rb_Array): avoid using rb_respond_to(). * object.c (rb_Integer): ditto. * eval.c (get_backtrace): no conversion for nil. * parse.y (reduce_nodes): empty body should return nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-26* io.c (rb_io_initialize): should retrieve flags from copying filematz
descriptor. [ruby-dev:24961] * eval.c (method_missing): raise TypeError for classes do not have allocators. [ruby-core:03752] * lib/erb.rb: [ruby-core:03786] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-20* string.c (rb_str_splice): should place index wrapping aftermatz
possible modification. [ruby-dev:24940] * eval.c (error_print): nicer traceback at interrupt. [ruby-core:03774] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-17* re.c (rb_reg_initialize_m): should raise exception instead ofmatz
compile error. [ruby-core:03755] * string.c (rb_str_splice): move rb_str_modify() after StringValue(), which may alter the receiver. [ruby-dev:24878] * error.c (rb_error_frozen): now raise RuntimeError instead of TypeError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-16* string.c (str_mod_check): frozen check should be separated.matz
[ruby-core:3742] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-15* eval.c (Init_Proc): make proc as an alias to Proc.new.matz
[ruby-dev:24848] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-14* eval.c (rb_yield_0): lambda{}.call(1) should raise exception.matz
[ruby-talk:120253] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-14* string.c (rb_str_clear): avoid revealing NULL pointer.matz
[ruby-dev:24766] * string.c (str_gsub): add paranoid check. [ruby-dev:24827] * string.c (str_mod_check): check frozen status as well. [ruby-dev:24801] * lib/mathn.rb (Integer::gcd2): faster implementation by <erlercw@siu.edu>. [ruby-talk:120232] * ext/gdbm/gdbm.c (fgdbm_store): StringValue() may alter string pointer. [ruby-dev:24783] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-12* eval.c (ruby_options): now we cannot call rb_glob() beforeusa
ruby_init(), so call rb_w32_cmdvector() at ruby_options(). * win32.{c,h} (rb_w32_cmdvector): rename make_cmdvector() and export it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-10* dir.c (rb_glob2): do not allocate buffer from heap to avoidmatz
memory leaks. use string object for buffering instead. [ruby-dev:24738] * dir.c (join_path): ditto. * io.c (io_read): external input buffer may be modified even after rb_str_locktmp(). [ruby-dev:24735] * dir.c (fnmatch): p or s may be NULL. [ruby-dev:24749] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-01* eval.c (proc_invoke): nail down dyna_var node when Proc objectmatz
or continuation is created. [ruby-dev:24671] * io.c (rb_io_s_popen): do not expand argv array. [ruby-dev:24670] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-30* eval.c (rb_eval): NODE_XSTR should pass copy of literal string.matz
* array.c (rb_ary_update): a[n,m]=nil no longer works as element deletion. * enum.c (enum_sort_by): protect continuation jump in. [ruby-dev:24642] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-29* eval.c (rb_thread_start_0): forget to free some memory chunks.matz
[ruby-core:03611] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-29* eval.c (ruby_cleanup): ruby_finalize_1 may cause exception,matz
should be wrapped by PUSH_TAG/POP_TAG(). [ruby-dev:24627] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-27* node.h (NODE_TYPESHIFT): allow 4 more bits for line numbers.matz
[ruby-talk:117841] * ruby.h (FL_ABLE): nodes are not subject for flag operations. * io.c (ARGF_FORWARD): should have specified argv explicitly, since we no longer have frame->argv saved. [ruby-dev:24602] * string.c (RESIZE_CAPA): check string attribute before modifying capacity member of string structure. [ruby-dev:24594] * ext/zlib/zlib.c (gzreader_gets): use memchr() to to gain performance. [ruby-talk:117701] * sprintf.c (rb_f_sprintf): raise ArgumentError for extra arguments, unless (digit)$ style used. * io.c (rb_io_fptr_finalize): leave stdin/stdout/stderr open in interpreter termination. [ruby-dev:24579] * eval.c (frame_free): Guy Decoux solved the leak problem. Thanks. [ruby-core:03549] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e