summaryrefslogtreecommitdiffstats
path: root/ToDo
Commit message (Collapse)AuthorAgeFilesLines
* * gc.c (rb_gc): check odd alignment stack on m68k machines.matz2003-05-081-9/+4
| | | | | | | * numeric.c (num_step): better error treatment of float values. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (ruby_xmalloc): remove MALLOC_LIMIT to avoid frequentmatz2002-09-061-1/+0
| | | | | | | garabage collection. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c (rb_path2class): should not use rb_eval_string().matz2002-09-051-0/+1
| | | | | | | | | | * marshal.c (w_extended): should allow marshaling of object which is extended by named module. * class.c (rb_make_metaclass): super may be T_ICLASS, need to skip. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_become): should not free ptr if it's shared.matz2002-08-291-2/+3
| | | | | | | | | | | * eval.c (rb_alias): prohibit making an alias named "allocate" if klass is a metaclass. * string.c (rb_string_value_ptr): StringValuePtr() should never return NULL pointer. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_putc): output via rb_io_write().matz2002-08-201-0/+1
| | | | | | | | * re.c (rb_reg_initialize_m): frozen check should be moved here from rb_reg_initialize(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c: replace with Mersenne Twister RNG.matz2002-07-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eval.c (jump_tag_but_local_jump): preserve retval in LocalJumpError exceptions. * parse.y (command): no more check for "super outside of method". * eval.c (rb_mod_define_method): should set last_class and last_func in the block->frame. * eval.c (error_handle): should handle TAG_THROW as well. * parse.y (yylex): new decimal notation '0d4567'. * parse.y (yylex): new octal notation '0o777'. * parse.y (string_content): every string_content node should return string only. use NODE_EVSTR to coercing. * eval.c (rb_eval): NODE_EVSTR support. * re.c (rb_reg_quote): avoid unnecessary string allocation. * string.c (get_pat): quote metachracters before compiling a string into a regex. * string.c (rb_str_split_m): special treatment of strings of size 1, but AWK emulation. now uses get_pat(). * string.c (rb_str_match_m): quote metacharacters. * string.c (rb_str_match2): ditto. * ext/socket/socket.c (sock_addrinfo): make all 3 versions of getaddrinfo happy. [ruby-core:00184] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_clear_cache_by_class): new function.matz2002-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * eval.c (set_method_visibility): should have clear cache forq updated visibility. * numeric.c (flo_to_s): default format precision to be "%.16g". * util.c (ruby_strtod): use own strtod(3) implementation to avoid locale hell. Due to this change "0xff".to_f no longer returns 255.0 * eval.c (avalue_to_yvalue): new function to distinguish yvalue (no-arg == Qundef) from svalue (no-arg == Qnil). * eval.c (rb_yield_0): use avalue_to_yvalue(). * eval.c (assign): warn if val == Qundef where it means rhs is void (e.g. yield without value or call without argument). * parse.y (value_expr): need not to warn for WHILE and UNTIL, since they can have return value (via valued break). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_s_quote): # also should be quoted.matz2002-05-071-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (Init_Array): remove Array#filter.matz2002-01-231-0/+1
| | | | | | | | | | | | | * object.c (rb_mod_initialize): should accept zero argument. * object.c (rb_mod_cmp): should raise ArgumentError if inheritance/inclusion relation between two classes/modules is not defined. [new] * io.c (rb_io_fsync): new method. [new] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): need not to clar method cache for NODE_CLASS,matz2002-01-191-0/+1
| | | | | | | | | | NODE_SCLASS. * gc.c (obj_free): need not to clear method cache on class/module finalization. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (match_select): should propagate taintness.matz2002-01-111-0/+1
| | | | | | | | | | | | | * hash.c (rb_hash_set_default): Hash#default= should return the new value. * string.c (rb_str_to_i): accepts optional base argument. [new] * numeric.c (rb_fix2str): should not handle negative fixnum values int32 via calling sprintf() directly. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_replace): swap arguments of OBJ_INFECT.matz2001-12-181-0/+1
| | | | | | | | | | | | * eval.c (rb_thread_schedule): should not select a thread which is not yet initialized. * time.c (time_plus): wrong boundary check. * time.c (time_minus): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_match_m): should convert an argument intomatz2001-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | regexp if it's a string. * array.c (rb_ary_select): Array#select(n,m,...) now works like Array#indexes(n,m,..). [new, experimental] * hash.c (rb_hash_select): ditto. * hash.c (env_select): ditto. * re.c (match_select): ditto. * struct.c (rb_struct_select): ditto. * gc.c (STR_ASSOC): use FL_USER3 instead of FL_USER2. * parse.y (str_extend): make up pushback call. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_modify): should copy the internal buffer if thematz2001-12-101-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modifying buffer is shared. * array.c (ary_make_shared): make an internal buffer of an array to be shared. * array.c (rb_ary_shift): avoid sliding an internal buffer by using shared buffer. * array.c (rb_ary_subseq): avoid copying the buffer. * parse.y (gettable): should freeze __LINE__ string. * io.c (rb_io_puts): old behavoir restored. rationale: a) if you want to call to_s for arrays, you can just call print a, "\n". b) to_s wastes memory if array (and sum of its contents) is huge. c) now any object that has to_ary is treated as an array, using rb_check_convert_type(). * hash.c (rb_hash_initialize): now accepts a block to calculate the default value. [new] * hash.c (rb_hash_aref): call "default" method to get the value corrensponding to the non existing key. * hash.c (rb_hash_default): get the default value based on the block given to 'new'. Now it takes an optinal "key" argument. "default" became the method to get the value for non existing key. Users may override "default" method to change the hash behavior. * hash.c (rb_hash_set_default): clear the flag if a block is given to 'new' * object.c (Init_Object): undef Data.allocate, left Data.new. * ext/curses/curses.c (window_scrollok): use RTEST(). * ext/curses/curses.c (window_idlok): ditto. * ext/curses/curses.c (window_keypad): ditto. * ext/curses/curses.c (window_idlok): idlok() may return void on some platforms; so don't use return value. * ext/curses/curses.c (window_scrollok): ditto for consistency. * ext/curses/curses.c: replace FIX2INT() by typechecking NUM2INT(). * parse.y (str_extend): should not process immature #$x and #@x interpolation, e.g #@#@ etc. * enum.c (enum_sort_by): sort_by does not have to be stable always. * enum.c (enum_sort_by): call qsort directly to gain performance. * util.c (ruby_qsort): ruby_qsort(qs6) is now native thread safe. * error.c (rb_sys_fail): it must be a bug if it's called when errno == 0. * regex.c (WC2MBC1ST): should not pass through > 0x80 number in UTF-8. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parse_regx): should raise error on untermitatedmatz2001-11-191-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expression interpolation. * pack.c (pack_unpack): should give length to utf8_to_uv(). * pack.c (utf8_to_uv): add length check. * massages: replace "wrong #" by "wrong number". * marshal.c (w_float): output Infinity and NaN explicitly. * marshal.c (r_object): support new explicit float format. * eval.c (rb_thread_wait_for): select may cause ERESTART on Solaris. * eval.c (rb_thread_select): ditto. * array.c (rb_ary_join): dumped core if sep is not T_STRING nor T_NIL. * array.c (rb_ary_join): buffer size calculattion was wrong. * array.c (rb_ary_to_s): if rb_output_fs is nil, insert newlines between array elements (use rb_default_rs as newline litral) [experimental]. * gc.c (init_mark_stack): no need to clear mark_stack. * gc.c (gc_mark_all): need to handle finalizer mark. * gc.c (gc_mark_rest): use MEMCPY instead of memcpy. * gc.c (rb_gc_mark): earlier const check to avoid pusing special constants into mark stack. * numeric.c (fix_to_s): 'to_s' now takes optional argument to specify radix. [new] * bignum.c (rb_big_to_s): ditto. [new] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_index): wrong increment for non alphanumericmatz2001-10-161-2/+7
| | | | | | | string. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (unix_addr): getsockname(2) may result len = 0.matz2001-10-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ext/socket/socket.c (unix_peeraddr): getpeername(2) may result len = 0. * string.c (rb_str_subpat_set): support function for new argument pattern String#[re,offset] = val. [new] * eval.c (POP_BLOCK): rb_gc_force_recycle() was called too much. Should not be called if SCOPE_DONT_RECYCLE is set. * string.c (rb_str_aref_m): new argument pattern String#[re,offset]. [new] * string.c (rb_str_substr): should return an instance of receiver's class. * string.c (rb_str_succ): ditto. * array.c (rb_ary_subseq): ditto. * array.c (rb_ary_initialize): Array.new([1,2,3]) => [1,2,3]. [new] * string.c (rb_str_reverse): should return an instance of receiver's class. * string.c (rb_str_times): ditto. * array.c (rb_ary_times): ditto * string.c (str_gsub): ditto. * string.c (rb_str_ljust): ditto. * string.c (rb_str_rjust): ditto. * string.c (rb_str_center): ditto. * eval.c (eval): retrieves file, line information from binding. * eval.c (intersect_fds): counts intersecting fds. * eval.c (rb_thread_schedule): only fds requested by each thread count as select_value. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_init): String.new() => ""matz2001-09-191-2/+2
| | | | | | | | | | * dir.c (dir_path): new method. * dir.c (dir_initialize): wrap DIR into struct, along with path information. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (Init_Regexp): to_s to be alias to inspect.matz2001-09-051-5/+5
| | | | | | | | | | * parse.y (yylex): should support 'keyword='. * ruby.c (proc_options): should not adjust argc/argv if -e option is supplied. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (proc_options): should not alter origargv[].matz2001-09-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | * ruby.c (set_arg0): long strings for $0 dumped core. * ruby.c (set_arg0): use setprogtitle() if it's available. * io.c (rb_io_popen): accept integer flags as mode. * file.c (rb_find_file_ext): extension table can be supplied from outside. renamed. * eval.c (rb_f_require): replace rb_find_file_noext by rb_find_file_ext. * eval.c (rb_provided): should also check feature without extension. * numeric.c (flo_to_s): do not rely on decimal point to be '.' git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (is_defined): should not dump core for "defined?(())".matz2001-08-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eval.c (umethod_bind): recv can be an instance of descender of oklass if oklass is a Module. * hash.c (rb_hash_equal): check identiry equality first. * file.c (group_member): should check real gid only. * file.c (eaccess): do not cache euid, since effective euid may be changed via Process.euid=(). * file.c (eaccess): return -1 unless every specified access mode is permitted. * eval.c (rb_eval): while/until returns the value which is given to break. * parse.y (value_expr): using while/until/class/def as an expression is now gives a warning, not an error. * range.c (range_eqq): should compare strings based on magical increment (using String#upto), not dictionary order. * enum.c (enum_sort_by): new method for Schewartzian transformed stable sort. * variable.c (mod_av_set): detect constant overriding for built-in classes/modules. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * range.c (range_step): 'iter' here should be an array.matz2001-08-201-0/+1
| | | | | | | | | | | | | | | | * marshal.c (w_object): should retrieve __member__ data from non-singleton class. * variable.c (rb_cvar_get): class variable override check added. * variable.c (rb_cvar_set): ditto * variable.c (rb_cvar_declare): ditto. * parse.y (parse_regx): handle backslash escaping of delimiter here. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_provide_feature): should not tweak extension used formatz2001-07-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | loading. * io.c (io_fread): use fread(3) if PENDING_COUND is available. * class.c (rb_mod_include_p): Module#include? added. [new] * re.c (ignorecase_setter): give warning on modifying $=. * string.c (rb_str_casecmp): new method. [new] * string.c (rb_str_eql): separated from rb_str_equal(), make it always be case sensitive. [new] * string.c (rb_str_hash): made it always be case sensitive. * eval.c (rb_f_require): should not include path in $" value * file.c (rb_find_file): should return 0 explicitly on failure. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_require): searches ".rb" and ".so" at the samematz2001-06-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | time. previous behavior (search ".rb", then ".so") has a security risk (ruby-bugs#PR140). * array.c (rb_ary_to_ary): new function to replace internal rb_Array(), which never calls to_a, but to_ary (rb_Array() might call both). [new] * regex.c (PUSH_FAILURE_POINT): push option status again. * regex.c (re_compile_pattern): avoid pushing unnecessary option_set. * eval.c (rb_load): tainted string is OK if wrapped *and* $SAFE >= 4. * eval.c (rb_thread_start_0): should not nail down higher blocks before preserving original context (i.e. should not alter original context). * eval.c (proc_yield): new method equivalent to Proc#call but no check for number of arguments. [new] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bigdivrem): access boundary bug.matz2001-05-111-1/+1
| | | | | | | | | | | | | | | | | | | * marshal.c (w_object): prohibit dumping out singleton classes. * object.c (rb_mod_to_s): distinguish singleton classes. * variable.c (rb_class2name): it's ok to reveal NilClass, TrueClass, FalseClass. * eval.c (rb_yield_0): preserve and restore ruby_cref as well. * eval.c (is_defined): core dumped during instance_eval for special constants. * eval.c (rb_eval): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* forgot some checkins.matz2001-05-061-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (block_pass): should not downgrade safe level.matz2001-05-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ext/dbm/extconf.rb: allow specifying dbm-type explicitly. * ext/dbm/extconf.rb: avoid gdbm if possible, because it leaks memory, whereas gdbm.so doesn't. potential incompatibility. * string.c (rb_str_insert): new method. * parse.y (yylex): lex_state after RESCUE_MOD should be EXPR_BEG. * array.c (rb_ary_insert): new method. * array.c (rb_ary_update): new utility function. * io.c (set_outfile): should check if closed before assignment. * eval.c (rb_eval): should preserve value of ruby_errinfo. * eval.c (rb_thread_schedule): infinite sleep should not cause dead lock. * array.c (rb_ary_flatten_bang): proper recursive detection. * eval.c (yield_under): need not to prohibit at safe level 4. * pack.c (pack_pack): p/P packs nil into NULL. * pack.c (pack_unpack): p/P unpacks NULL into nil. * pack.c (pack_pack): size check for P template. * ruby.c (set_arg0): wrong predicate when new $0 value is bigger than original space. * gc.c (id2ref): should use NUM2ULONG() * object.c (rb_mod_const_get): check whether name is a class variable name. * object.c (rb_mod_const_set): ditto. * object.c (rb_mod_const_defined): ditto. * marshal.c (w_float): precision changed to "%.16g" * eval.c (rb_call0): wrong retry behavior. * numeric.c (fix_aref): a bug on long>int architecture. * eval.c (rb_eval_string_wrap): should restore ruby_wrapper. * regex.c (re_compile_pattern): char class at either edge of range should be invalid. * eval.c (handle_rescue): use === to compare exception match. * error.c (syserr_eqq): comparison between SytemCallErrors should based on their error numbers. * eval.c (safe_getter): should use INT2NUM(). * bignum.c (rb_big2long): 2**31 cannot fit in 31 bit long. * regex.c (calculate_must_string): wrong length calculation. * eval.c (rb_thread_start_0): fixed memory leak. * parse.y (none): should clear cmdarg_stack too. * io.c (rb_fopen): use setvbuf() to avoid recursive malloc() on some platforms. * file.c (rb_stat_dev): device functions should honor stat field types (except long long such as dev_t). * eval.c (rb_mod_nesting): should not push nil for nesting array. * eval.c (rb_mod_s_constants): should not search array by rb_mod_const_at() for nil (happens for singleton class). * class.c (rb_singleton_class_attached): should modify iv_tbl by itself, no longer use rb_iv_set() to avoid freeze check error. * variable.c (rb_const_get): error message "uninitialized constant Foo at Bar::Baz" instead of "uninitialized constantBar::Baz::Foo". * eval.c (rb_mod_included): new hook called from rb_mod_include(). * io.c (opt_i_set): should strdup() inplace_edit string. * eval.c (exec_under): need to push cref too. * eval.c (rb_f_missing): raise NameError for "undefined local variable or method". * error.c (Init_Exception): new exception NoMethodError. NameError moved under ScriptError again. * eval.c (rb_f_missing): use NoMethodError instead of NameError. * file.c (Init_File): should redifine "new" class method. * eval.c (PUSH_CREF): sharing cref node was problematic. maintain runtime cref list instead. * eval.c (rb_eval): copy defn node before registering. * eval.c (rb_load): clear ruby_cref before loading. * variable.c (rb_const_get): no recursion to show full class path for modules. * eval.c (rb_set_safe_level): should set safe level in curr_thread as well. * eval.c (safe_setter): ditto. * object.c (rb_obj_is_instance_of): nil belongs to false, not true. * time.c (make_time_t): proper (I hope) daylight saving time handling for both US and Europe. I HATE DST! * eval.c (rb_thread_wait_for): non blocked signal interrupt should stop the interval. * eval.c (proc_eq): class check aded. * eval.c (proc_eq): typo fixed ("return" was ommitted). * error.c (Init_Exception): move NameError under StandardError. * class.c (rb_mod_clone): should copy method bodies too. * bignum.c (bigdivrem): should trim trailing zero bdigits of remainder, even if dd == 0. * file.c (check3rdbyte): safe string check moved here. * time.c (make_time_t): remove HAVE_TM_ZONE code since it sometimes reports wrong time. * time.c (make_time_t): remove unnecessary range check for platforms where negative time_t is available. * process.c (proc_waitall): should push Process::Status instead of Finuxm status. * process.c (waitall_each): should add all entries in pid_tbl. these changes are inspired by Koji Arai. Thanks. * process.c (proc_wait): should not iterate if pid_tbl is 0. * process.c (proc_waitall): ditto. * numeric.c (flodivmod): a bug in no fmod case. * process.c (pst_wifsignaled): should apply WIFSIGNALED for status (int), not st (VALUE). * io.c (Init_IO): value of $/ and $\ are no longer restricted to strings. type checks are done on demand. * class.c (rb_include_module): module inclusion should be check taints. * ruby.h (STR2CSTR): replace to StringType() and StringTypePtr(). * ruby.h (rb_str2cstr): ditto. * eval.c (rb_load): should not copy topleve local variables. It cause variable/method ambiguity. Thanks to L. Peter Deutsch. * class.c (rb_include_module): freeze check at first. * eval.c (rb_attr): sprintf() and rb_intern() moved into conditional body. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c (glob_helper): replace lstat() by stat() to follow symlinkmatz2001-03-191-0/+1
| | | | | | | | | in the case like 'symlink/*'. * dir.c (glob_helper): gave warning too much. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (primary): rescue and ensure clauses should be allowedmatz2001-03-061-0/+1
| | | | | | | to appear in singleton method body. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (proc_eq): compare Procs using blocktag equality.matz2001-03-051-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (proc_call): should not modify ruby_block->frame.itermatz2001-02-261-0/+1
| | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@1219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (secure_visibility): visibility check for untainted modules.matz2001-02-191-0/+1
| | | | | | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@1199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (set_outfile): f should be the FILE* from the assigning value.matz2001-02-161-4/+5
| | | | | | | | | | | | | | * ext/socket/socket.c (tcp_s_open): should not give default value to local_host. * time.c (time_s_times): move to Process::times. * file.c (rb_file_s_lchmod): new method File::lchmod. * file.c (rb_file_s_lchown): new method File::lchown. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_ctl): do not call ioctl/fcntl for f2, if f and f2matz2001-02-131-3/+1
| | | | | | | | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@1177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parse_quotedwords): %w should allow parenthesis escape.matz2001-02-081-0/+3
| | | | | | | | | | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@1167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_sort_bang): returns self, even if its length ismatz2001-02-021-1/+2
| | | | | | | | | | less than 2. * eval.c (POP_VARS): propagate DVAR_DONT_RECYCLE, if SCOPE_DONT_RECYCLE of ruby_scope is set. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_s_read): new method to call IO#read frommatz2001-01-181-0/+1
| | | | | | | | pathname. In addition, it accepts third optional argument to specify starting point. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (path_check_1): should restore modified path.matz2001-01-091-3/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_inject): new method.matz2001-01-091-45/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@1090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* changes from personal modifies -- matzmatz2000-12-281-0/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 001225matz2000-12-251-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-12-121-1/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-12-081-1/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-12-051-4/+7
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-09-071-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-08-311-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-08-291-6/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-08-281-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-08-241-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-07-171-1/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e