aboutsummaryrefslogtreecommitdiffstats
path: root/misc
Commit message (Collapse)AuthorAgeFilesLines
...
* * misc/ruby-mode.el (ruby-accurate-end-of-block): incomplete blocknobu2002-07-301-4/+5
| | | | | | | | | | caused infinite loop. * misc/ruby-mode.el (ruby-parse-partial): returns nil unless delimiters found. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-mode.el (ruby-expr-beg): wrong indent at modifiersnobu2002-07-261-3/+5
| | | | | | | after ?. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-mode.el (ruby-delimiter): include here document.nobu2002-07-251-247/+288
| | | | | | | | | | | | | | | | | | | | | * misc/ruby-mode.el (ruby-deep-arglist): skips spaces after parenthesis when 'space. * misc/ruby-mode.el (ruby-imenu-create-index): fix for nested classes. * misc/ruby-mode.el (ruby-accurate-end-of-block): added. scan a block in the order. * misc/ruby-mode.el (ruby-expr-beg): support for here document. * misc/ruby-mode.el (ruby-parse-partial): splitted from ruby-parse-region. * misc/ruby-mode.el (ruby-move-to-block): skips RD style comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_expr_str): need to process backslashes properly.matz2002-06-281-0/+1
| | | | | | | | | | | | | | | | | | * object.c (rb_any_to_a): declare Object#to_a to be obsolete. * object.c (rb_Array): do not convert nil into [] automagically. * object.c (rb_Integer): use "to_int" instead of "to_i". [experimental] * object.c (nil_to_f): new method. * object.c (rb_Integer): Symbols and nil should cause error. * object.c (rb_Float): nil should cause error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (proc_options): removed "-*-" support for #! line.matz2002-05-231-3/+9
| | | | | | | | | | | | | * io.c (rb_io_s_sysopen): new method to get a raw file descriptor. [new] * ext/socket/socket.c (tcp_sysaccept): new method to return an accepted socket fd (integer). [new] * ext/socket/socket.c (unix_sysaccept,sock_sysaccept): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-mode.el (ruby-font-lock-keywords): symbols end with '_'.nobu2002-05-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_clear_cache_by_class): new function.matz2002-05-141-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | * 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@2457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-mode.el (ruby-font-lock-keywords): fontify symbols fornobu2002-04-101-1/+1
| | | | | | | unary operators and aset. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-mode.el (ruby-block-hanging-re): rescue block was toonobu2002-02-181-2/+6
| | | | | | | indented. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-mode.el (ruby-font-lock-keywords): fontifynobu2002-02-171-3/+3
| | | | | | | instance/class/global variables start with '_'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_stat_inspect): print dev, rdev in hexadecimal.matz2002-02-011-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_stat_rdev_major): added. [new]matz2002-01-291-2/+9
| | | | | | | | | * file.c (rb_stat_rdev_minor): added. [new] * file.c (rb_stat_inspect): print mode in octal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c (rb_include_module): detect cyclic module inclusion.matz2002-01-251-2/+1
| | | | | | | | | | | | | | | | | | | | | | * eval.c (rb_thread_cleanup): need not to free thread stacks at process termination. * array.c (rb_ary_fetch): use the block to get the default value if the block is given. * eval.c (rb_thread_schedule): should check time only if BOTH WAIT_SELECT and WAIT_TIME. * eval.c (umethod_bind): should update rklass field. * hash.c (rb_hash_update): if a block is given, yields [key, value1, value2] to the block to resolve conflict. * string.c (rb_str_split_m): no need to consider KANJI characters, if the length of separator is 1 (byte). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (Init_Array): remove Array#filter.matz2002-01-231-4/+8
| | | | | | | | | | | | | * 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@2014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_s_new): block check moved from initialize to thismatz2002-01-181-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | method. * io.c (rb_io_s_open): open should call initialize too. IO#for_fd also calls initialize. [new] * error.c (rb_sys_fail): replace INT2FIX() by INT2NUM() since errno value may not fit in Fixnum size on Hurd. * error.c (set_syserr): ditto. * dir.c (dir_s_glob): returns nil if block given. * io.c (rb_io_each_byte): should return self. * io.c (rb_io_close_m): close check added. * dir.c (dir_seek): should return pos. * parse.y (fixpos): orig may be (NODE*)1, which should not be dereferenced. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-mode.el (ruby-calculate-indent): indentation afternobu2002-01-091-7/+15
| | | | | | | | | | comment at beginning of buffer failed. * misc/ruby-mode.el (font-lock-defaults): unless XEmacs, set font-lock variables in ruby-mode-hook. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-mode.el (ruby-forward-string): forward a string. [new]nobu2002-01-051-78/+84
| | | | | | | | | | | | | * misc/ruby-mode.el (ruby-parse-region): handle nested parentheses in a string and terminators in #{}. * misc/ruby-mode.el (ruby-calculate-indent): ditto. * misc/ruby-mode.el (ruby-font-lock-syntactic-keywords): fix font-lock problem [ruby-talk:29296]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_f_system): abandon vfork.matz2002-01-041-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | * io.c (pipe_open): ditto. * defines.h: sparc linux needs different FLUSH_REGISTER_WINDOWS * regex.c (re_search): abandon stclass optimization. * bignum.c (rb_cstr2inum): deny "0_". * bignum.c (rb_cstr2inum): allow "0\n" and so on. * error.c (rb_invalid_str): utility function to show inspect()'ed string. * bignum.c (rb_cstr2inum): prints invalid strings in inspect()'ed format. * object.c (rb_Float): ditto. * object.c (rb_convert_type): no longer use rb_rescue(). * re.c (rb_reg_search): initialize taint status of match object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_plus): result should not be negative unlessmatz2001-12-211-3/+4
| | | | | | | | | | | | | | | | | | | | | | NEGATIVE_TIME_T is defined. * time.c (time_new_internal): should check tv_sec overflow too. * time.c (time_timeval): should check time_t range when time is initialized from float. * time.c (time_plus): uses modf(3). * variable.c (rb_cvar_set): add frozen class/module check. * variable.c (rb_cvar_declare): add frozen class/module check. * re.c (match_to_a): should propagate taint. * re.c (rb_reg_s_quote): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_replace): swap arguments of OBJ_INFECT.matz2001-12-181-4/+4
| | | | | | | | | | | | * 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@1918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_thread_select): should subtract timeofday() frommatz2001-11-281-0/+7
| | | | | | | | | | | | | | limit, not reverse. * util.c (scan_hex): x is not a hexadecimal digit. * eval.c (rb_thread_schedule): should treat the case that select(2) returns 0, if a thread is under both WAIT_SELECT and WAIT_TIME. Jakub Travnik <J.Travnik@sh.cvut.cz> actually fixed this bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_chomp_bang): do smart chomp if $/ == '\n'.matz2001-10-301-7/+11
| | | | | | | | | | | | | * io.c (rb_io_puts): don't treat Array specially. * bignum.c (rb_big_cmp): should convert bignum to float. * eval.c (rb_f_eval): can't modify untainted binding. * regex.c (re_compile_pattern): should preverve p0 value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_index): wrong increment for non alphanumericmatz2001-10-161-1/+1
| | | | | | | string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (yylex): ternary ? can be followed by newline.matz2001-08-291-6/+6
| | | | | | | | | | | | | | | | | | | | | | * eval.c (rb_f_require): should check static linked libraries before raising exception. * array.c (rb_ary_equal): check identiry equality first. * string.c (rb_str_equal): ditto. * struct.c (rb_struct_equal): ditto. * numeric.c (Init_Numeric): undef Integer::new. * eval.c (rb_eval): NODE_WHILE should update result for each conditional evaluation. * eval.c (rb_eval): NODE_UNTIL should return last evaluated value (or value given to break). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * range.c (range_step): new method.matz2001-08-141-37/+29
| | | | | | | | | * string.c (rb_str_cmp): remove needless conditional. * string.c (rb_str_lstrip_bang) `return Qnil' was missing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_lstrip_bang): new method.matz2001-08-061-8/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * string.c (rb_str_rstrip_bang): new method. * string.c (rb_str_associate): should consider STR_ASSOC too. * eval.c (rb_undefined): do not recurse if method_missing is undefined. * process.c (proc_waitpid): now all arguments are optional. * process.c (Init_process): waitpid is now alias to wait. * process.c (Init_process): waitpid2 is now alias to wait2. * process.c (rb_waitpid): made public. * ext/pty/pty.c (pty_getpty): avoid disturbing SIGCHLD using thread and rb_waitpid. * process.c (proc_getpgrp): now takes no argument on all platforms. * process.c (proc_setpgrp): ditto. * ext/socket/socket.c (sock_s_pack_sockaddr_in): added Socket::pack_sockaddr_in(). [new] * ext/socket/socket.c (sock_s_pack_sockaddr_un): added Socket::pack_sockaddr_un(). [new] * ext/socket/socket.c (sock_s_pack_sockaddr_in): added Socket::unpack_sockaddr_in(). [new] * ext/socket/socket.c (sock_s_pack_sockaddr_un): added Socket::unpack_sockaddr_un(). [new] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (svalue_to_avalue): new conversion scheme between singlematz2001-06-231-0/+4
| | | | | | | | | | | | | | | | | | | value and array values. * eval.c (avalue_to_svalue): ditto. * eval.c (rb_eval): REXPAND now uses avalue_to_svalue(), return and yield too. * eval.c (rb_yield_0): use avalue_to_svalue(). * eval.c (proc_invoke): Proc#call gives avaules, whereas Proc#yield gives mvalues. * eval.c (bmcall): convert given value (svalue) to avalue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_require): searches ".rb" and ".so" at the samematz2001-06-191-15/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@1526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (aref_args): "*arg" should always be expanded by REXPAND.matz2001-06-061-18/+15
| | | | | | | * variable.c (fc_i): removed vast string allocation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (proc_options): unexpected SecurityError happens when -T4.matz2001-05-301-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * regex.c (re_compile_pattern): * \1 .. \9 should be backreferences always. * regex.c (re_match): backreferences corresponding to unclosed/unmatched parentheses should fail always. * string.c (rb_str_cat): use rb_str_buf_cat() if possible. [new] * string.c (rb_str_append): ditto. * string.c (rb_str_buf_cat): remove unnecessary check (type, taint, modify) to gain performance. * string.c (rb_str_buf_append): ditto. * string.c (rb_str_buf_finish): removed. * string.c (rb_str_buf_new): buffering string function. [new] * string.c (rb_str_buf_append): ditto. * string.c (rb_str_buf_cat): ditto. * string.c (rb_str_buf_finish): ditto. * time.c (make_time_t): local time adjustment revised. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* forgot some checkins.matz2001-05-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parse_quotedwords): %w should allow parenthesis escape.matz2001-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | * 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
* 001225matz2000-12-251-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-12-051-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-11-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-10-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-10-101-6/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-10-021-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matz: 1.6.0 final (hopufully)matz2000-09-121-10/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-09-071-61/+34
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-09-011-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-07-041-6/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2000-06-12matz2000-06-121-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2000-05-24matz2000-05-241-2/+39
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2000-05-01matz2000-05-011-6/+40
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2000-03-06matz2000-03-061-8/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2000-02-08matz2000-02-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2000-01-18matz2000-01-181-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 20000105matz2000-01-051-13/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 19991214matz1999-12-141-1/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e