summaryrefslogtreecommitdiff
path: root/eval.c
AgeCommit message (Collapse)Author
2001-03-13* io.c (argf_seek_m): wrong calling sequence of rb_io_seek().matz
* parse.y (cond0): no special treatment of string literal in condition. * math.c: add acos, asin, atan, conh, sinh, tanh and hypot to Math. * configure.in: check hypot availablility. * missing/hypot.c: public domain rewrite of hypot. * parse.y (warn_unless_e_option): warning condition was wrong. * parse.y (warning_unless_e_option): ditto. * enum.c (enum_all): new method 'all?', which returns true if block returns true for all elements. * enum.c (enum_any): new method 'any?', which returns true if block retruns true for any of elements. * marshal.c (marshal_load): do not give warning unless explicitly set to verbose. * eval.c (rb_exit): give string value "exit" to SystemExit. * ruby.c (proc_options): -v should not print version if proc_options called via moreswitches(). * parse.y (stmt): while/until modifier must work for empty body. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-06* parse.y (primary): rescue and ensure clauses should be allowedmatz
to appear in singleton method body. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-05* eval.c (proc_eq): compare Procs using blocktag equality.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-28* string.c (rb_str_delete_bang): delete! should take at least 1matz
argument. * ruby.c (load_file): add rb_gc() after loading to avoid extraordinary memory growth. * dir.c (rb_glob_helper): "./foo" should match "foo", not "./foo". * eval.c (ev_const_get): retrieve Object's constant if no current class is available (e.g. defining singleton class for Fixnums). * eval.c (ev_const_defined): check Object's constant if no current class is available (e.g. defining singleton class for Fixnums). * time.c (time_timeval): negative time interval shoule not be allowed. * eval.c (proc_call): ignore block to `call' always, despite of being orphan or not. * eval.c (rb_yield_0): should check based on rb_block_given_p() and rb_f_block_given_p(). * configure.in (frame-address): --enable-frame-address to allow __builtin_frame_address() to be used. * eval.c (stack_length): use __builtin_frame_address() based on the macro USE_BUILTIN_FRAME_ADDRESS. * gc.c (rb_gc): ditto. * gc.c (Init_stack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-27* time.c (time_timeval): negative time interval shoule not bematz
allowed. * eval.c (proc_call): ignore block to `call' always, despite of being orphan or not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-26* eval.c (proc_call): should not modify ruby_block->frame.itermatz
based on ruby_frame->iter altered by PUSH_ITER(). * eval.c (rb_thread_fd_close): should save current context before raising exception. * io.c (set_stdin): preserve original stdin. * io.c (set_outfile): preserve original stdout/stderr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-19* eval.c (secure_visibility): visibility check for untainted modules.matz
* signal.c (sigpipe): sighandler which does nothing. * signal.c (trap): set sigpipe function for SIGPIPE. * signal.c (Init_signal): default SIGPIPE handler should be sigpipe function. * array.c (rb_ary_subseq): wrong boundary check. * parse.y (cond0): integer literal in condition should not be compared to lineno ($.). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-14* dir.c (dir_s_glob): supprt backslash escape of metacharactersmatz
and delimiters. * dir.c (remove_backslases): remove backslashes from path before calling stat(2). * dir.c (dir_s_glob): call rb_yield directly (via push_pattern) if block is given to the method. * dir.c (push_pattern): do not call rb_ary_push; yield directly. * eval.c (blk_copy_prev): reduced ALLOC_N too much. * eval.c (frame_dup): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-13* io.c (rb_io_ctl): do not call ioctl/fcntl for f2, if f and f2matz
have same fileno. * eval.c (rb_load): raise LocaJumpError if unexpected local jumps appear during load. * ext/socket/socket.c (bsock_close_read): don't call rb_thread_fd_close(); it's supposed to be called by io_io_close(). * ext/socket/socket.c (bsock_close_read): do not modify f and f2. * ext/socket/socket.c (bsock_close_write): ditto. * ext/socket/socket.c (sock_new): avoid dup(2) on sockets. * parse.y (primary): preserve and clear in_single and in_def using stack to prevent nested method errors in singleton class bodies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-11* eval.c (stack_length): use __builtin_frame_address() only ifeban
GCC and i386 CPU. * gc.c (rb_gc, Init_stack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-08* parse.y (parse_quotedwords): %w should allow parenthesis escape.matz
* parse.y (parse_qstring): %q should allow terminator escape. * re.c (rb_reg_options): new method to give an option values. * parse.y (cond0): disable special treating of integer literal in conditional unless option -e is supplied. changes current behavior. experimental. * parse.y (cond0): give warning for string/integer literals and dot operators in conditionals unless option -e is supplied. * re.c (rb_reg_equal): all option flags should be same to be equal. * error.c (Init_Exception): make Interrupt a subclass of SignalException. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-02* array.c (rb_ary_sort_bang): returns self, even if its length ismatz
less than 2. * eval.c (POP_VARS): propagate DVAR_DONT_RECYCLE, if SCOPE_DONT_RECYCLE of ruby_scope is set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-01-29* eval.c (block_pass): return from block jumps directory tomatz
block invoker. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-01-29* string.c (str_independent): should not clear str->orig here.matz
it's too early. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-01-24* eval.c (POP_BLOCK_TAG): call rb_gc_force_recycle() if block hasmatz
not been objectified. * eval.c (rb_callcc): should nail down block->tag history to avoid rb_gc_force_recycle(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-01-23* gc.c (os_live_obj): do not list terminated object.matz
* gc.c (os_obj_of): ditto. * gc.c (rb_gc_mark): support new T_BLKTAG tag. * gc.c (obj_free): ditto. * eval.c (new_blktag): creation of new block tag, which holds destination of global jump and orphan status. * eval.c (block_pass): break from orphan Proc object will raise a LocalJumpError exception. * eval.c (block_pass): behavior consistency with proc_call(). do not propagate `break'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-01-18* io.c (rb_io_s_read): new method to call IO#read frommatz
pathname. In addition, it accepts third optional argument to specify starting point. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-01-15Mon Jan 15 16:00:07 2001 Yukihiro Matsumoto <matz@ruby-lang.org>matz
* pack.c (pack_unpack): should check associated pointer packed by pack("P"). restriction added. Sun Jan 14 21:49:28 2001 Koji Arai <JCA02266@nifty.ne.jp> * sprintf.c (rb_f_sprintf): simple typo. binary base should be 2, not '2'. * re.c (rb_reg_s_last_match): should explicitly return nth match. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-01-10* m17n baseline.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-01-10setres[ug]id, NORETURNeban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-01-09* enum.c (enum_inject): new method.matz
* gc.c (rb_gc_call_finalizer_at_exit): clear klass member of terminating object. * eval.c (rb_call): raise exception for terminated object. * bignum.c (bigdivrem): t2 might be too big for signed long; do not use rb_int2big(), but rb_uint2big(). * error.c (rb_load_fail): new func to report LoadError. * ruby.c (load_file): use rb_load_fail. * eval.c (ruby_finalize): should enclosed by PUSH_TAG/POP_TAG. * gc.c (rb_gc_mark): link 2 of NODE_IFUNC should not be explicitly marked. it may contain non object pointer. * re.c (reg_s_last_match): Regexp::last_match(nth) returns nth substring of the match (alternative for $& and $<digit>). * eval.c (rb_mod_define_method): wrong comparison for blocks. * gc.c (id2ref): should handle Symbol too. * gc.c (id2ref): should print original ptr value * eval.c (rb_iterate): NODE_CFUNC does not protect its data (nd_tval), so create new node NODE_IFUNC for iteration C function. * eval.c (rb_yield_0): use NODE_IFUNC. * gc.c (rb_gc_mark): support NODE_IFUNC. * gc.c (mem_error): prohibit recursive mem_error(). (ruby-bugs-ja:PR#36) * eval.c (rb_thread_fd_writable): should not switch context if rb_thread_critical is set. * eval.c (rb_thread_wait_fd): ditto. * eval.c (rb_thread_wait_for): ditto. * eval.c (rb_thread_select): ditto. * eval.c (rb_thread_join): join during critical section causes deadlock. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-29* eval.c (rb_iterate): NODE_CFUNC does not protect its datamatz
(nd_tval), so create new node NODE_IFUNC for iteration C function. * eval.c (rb_yield_0): use NODE_IFUNC. * gc.c (rb_gc_mark): support NODE_IFUNC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-29thread_critical bug reported by Dave - matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-27matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-26matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-25001225matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-22matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-18matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-12matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-08matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-07shugoshugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-06ebaneban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-05matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-27matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-21matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-20matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-17matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-16matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-08matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-20matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-171.6.2 (to be)matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-16matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-14matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-13matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-11matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-10matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-05matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-03matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-09-27matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-09-25matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e