aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* test material for r16453.gotoyuzo2008-05-182-0/+37
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpservlet/filehandler.rb: should normalize pathgotoyuzo2008-05-187-33/+152
| | | | | | | | | | | | | | | | | | name in path_info to prevent script disclosure vulnerability on DOSISH filesystems. (fix: CVE-2008-1891) Note: NTFS/FAT filesystem should not be published by the platforms other than Windows. Pathname interpretation (including short filename) is less than perfect. * lib/webrick/httpservlet/abstract.rb (WEBrick::HTTPServlet::AbstracServlet#redirect_to_directory_uri): should escape the value of Location: header. * lib/webrick/httpservlet/cgi_runner.rb: accept interpreter command line arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): check errno to detect error of ruby_strtoul.mame2008-05-174-3/+24
| | | | | | | | | * pack.c (pack_unpack): ditto. * test/ruby/test_pack.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (file_expand_path): fix for short file name on Cygwin.nobu2008-05-172-4/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (Init_VM): removed the definition of Thread#initialize,yugui2008-05-172-1/+5
| | | | | | | which is overwritten in Init_Thread and is never used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_sort_bang): should not free shared pointer, and setnobu2008-05-173-1/+17
| | | | | | | shared. [ruby-dev:34732] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Kernel#.sleep used never to sleep on Mac OS X. Fixed it and added error checks.yugui2008-05-172-1/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_eval.rb (test_define_method_block): new testnobu2008-05-171-0/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (ripper_warnS): now unused.nobu2008-05-171-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_s_extname): first dot is not an extension name.nobu2008-05-173-2/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_sort_bang): stop memory leak. [ruby-dev:34726]matz2008-05-165-28/+53
| | | | | | | | | | | | | | * re.c (rb_reg_search): need to free allocated buffer in re_register. * regexec.c (onig_region_new): more pedantic malloc check. * regexec.c (onig_region_resize): ditto. * regexec.c (STATE_CHECK_BUFF_INIT): ditto. * regexec.c (onig_region_copy): use onig_region_resize. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_module.rb (assert_method_defined?): added.nobu2008-05-161-6/+52
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * math.c (to_flo): rb_Float() accepts even strings for input.matz2008-05-166-14/+32
| | | | | | | | | | | * complex.c (nucomp_to_f): fix wrong message. * complex.c (nucomp_to_r): ditto. * object.c (rb_Float): do not check NaN for error. NaN is a part of valid float values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_string.rb: add tests to achieve over 90% testmame2008-05-155-5/+288
| | | | | | | | | | | | | coverage of string.c. * test/ruby/test_m17n.rb: ditto. * test/ruby/test_symbol.rb: ditto. * test/ruby/test_pack.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (tr_find): String#delete returned wrong result when multiplemame2008-05-153-5/+16
| | | | | | | | | utf-8 arguments are passed. * test/ruby/test_m17n.rb (test_delete): add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (ripper_warningS): now used.usa2008-05-152-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_cstr_to_dbl): no need for forceful warning whenmatz2008-05-153-3/+10
| | | | | | | | converting to float. overflow is a nature of float values. * parse.y (parser_yylex): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_prepare_enc): error condition was updated for nonmatz2008-05-152-19/+33
| | | | | | ASCII compatible strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/openssl_missing.c (HMAC_CTX_copy): adopted tomatz2008-05-154-14/+69
| | | | | | | | prototype change in openssl bundled with newer OpenBSD. a patch from Takahiro Kambe <taca at back-street.net> in [ruby-dev:34691]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (file_expand_path): support for alternative data streamnobu2008-05-156-36/+227
| | | | | | | | | | | and ignored trailing garbages of NTFS. * file.c (rb_file_s_basename): ditto. * file.c (rb_file_s_extname): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: fix typo.mame2008-05-141-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_object.rb: new tests to achieve over 90% testmame2008-05-1411-0/+882
| | | | | | | | | | | | | | | | | | | | | | | | | coverage of object.c, eval.c and eval_method.c. * test/ruby/test_module.rb: ditto. * test/ruby/test_trace.rb: ditto. * test/ruby/test_integer.rb: ditto. * test/ruby/test_float.rb: ditto. * test/ruby/test_method.rb: ditto. * test/ruby/test_variable.rb: ditto. * test/ruby/test_eval.rb: ditto. * test/ruby/test_exception.rb: ditto. * test/ruby/test_class.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_file_exhaustive.rb (assert_integer): may not Fixnum.nobu2008-05-141-29/+32
| | | | | | | | | | | | | | | | | | | | | * test/ruby/test_file_exhaustive.rb (test_stat, test_readable_p) (test_readable_real_p, test_world_readable_p, test_writable_p) (test_writable_real_p, test_world_writable_p, test_executable_p) (test_executable_real_p, test_owned_p, test_chmod, test_lchmod) (test_umask, test_stat_readable_p, test_stat_readable_real_p) (test_stat_world_readable_p, test_stat_writable_p) (test_stat_writable_real_p, test_stat_world_writable_p) (test_stat_executable_p, test_stat_executable_real_p) (test_stat_owned_p): mode, owner and group can't rely on cygwin. * test/ruby/test_file_exhaustive.rb (test_stat_init): test hard link on Windows too. * test/ruby/test_file_exhaustive.rb (test_test): struct stat dosn't have sub second mtime on cygwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove spaces before BOL.knu2008-05-141-47/+43
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c (insn_operand_intern): remove Qundef related code.ko12008-05-142-8/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_count): Override Enumerable#count for betterknu2008-05-143-0/+57
| | | | | | | performance. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def: add a "putcbase" instruction.ko12008-05-143-31/+32
| | | | | | | | | * compile.c, insns.def: fix to use putcbase instruction for class search. Qundef should not be used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test the actual value of (10**32768-1).to_s.akr2008-05-141-3/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): defer calling of rb_frame_self() until itmatz2008-05-132-2/+12
| | | | | | | | become really necessary. * eval.c (rb_call): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test.akr2008-05-131-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io_m17n.rb: remove a duplicative method.mame2008-05-139-16/+25
| | | | | | | | | | | | | | | | | | | * test/ruby/test_utf16.rb: rename a conflicting method name. * test/ruby/test_array.rb: ditto. * test/ruby/test_file_exhaustive.rb: ditto. * test/ruby/test_hash.rb: ditto. * test/ruby/test_env.rb: ditto. * test/ruby/test_fixnum.rb: ditto. * test/ruby/test_rational.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval_method.c (rb_add_method): fix check for warning whenmame2008-05-133-6/+11
| | | | | | | Object#initialize is redefined. (same as 1.8) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_yield): use rb_yield_values2.nobu2008-05-132-54/+36
| | | | | | | | | | | * enum.c (DEFINE_ENUMFUNCS): macro to define enumerator and yielding functions. * enum.c (enum_all_func, enum_any_func, enum_one_func, enum_none_func): reduced duplicate code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c: Update rdoc.knu2008-05-132-10/+17
| | | | | | | | | (enumerator_initialize): Discourage the use. (enum_each_slice, enum_each_cons, enumerator_each) (enumerator_with_index): Add a note about a call without a block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* check the chracters in (10**32768-1).to_s.akr2008-05-131-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_cat): fixed buffer overrun reported bymatz2008-05-133-4/+9
| | | | | | Christopher Thompson <cthompson at nexopia.com> in [ruby-core:16746] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_f_gets.): re-enable rdoc.akr2008-05-122-3/+12
| | | | | | | | (rb_f_readline): ditto. (rb_f_readlines): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (collect_local_variables_in_env): remove unnecessary checkmame2008-05-123-3/+14
| | | | | | | | | which causes: x=1;proc{local_variables}.call #=> [] * test/ruby/test_variable.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: small fixes.usa2008-05-121-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c, include/ruby/intern.h (rb_run_exec_options): externed.usa2008-05-126-23/+152
| | | | | | | | | | | | | | | | | | | | | | * process.c (save_redirect_fd, save_env_i, save_env, run_exec_dup2, run_exec_open, run_exec_pgroup, run_exec_rlimit, rb_run_exec_options): save parent's process environments. !!!remark!!! these are not thread-safe. * process.c (rb_spawn_internal): remove calling run_exec_options() because cannot restore after spawn. we'll fix this later. * io.c (pipe_open): ditto. * test/ruby/test_process.rb (test_execopts_env): upcase environment variable name for case insensitive platforms. * win32/win32.c (init_env): set USER environment variable only when USERNAME is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/date.rb (once): use Object#object_id instead of Symbol#to_i.akr2008-05-122-3/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/envutil.rb (rubybin): return expanded rubyexe instead ofusa2008-05-122-1/+6
| | | | | | | | expanded ruby if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (sym_to_i): really removed. [ruby-dev:34641]matz2008-05-121-21/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (grep_i): Be aware of multiple values;knu2008-05-122-50/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix [ruby-dev:34653]. (grep_iter_i): Ditto. (count_i): Ditto. (find_i): Ditto. (find_index_i): Ditto. (find_all_i): Ditto. (reject_i): Ditto. (inject_i): Ditto. (inject_op_i): Ditto. (partition_i): Ditto. (group_by_i): Ditto. (first_i): Ditto. (sort_by_i): Ditto. (all_i): Ditto. (all_iter_i): Ditto. (any_i): Ditto. (any_iter_i): Ditto. (one_i): Ditto. (one_iter_i): Ditto. (none_i): Ditto. (none_iter_i): Ditto. (min_i): Ditto. (min_ii): Ditto. (max_i): Ditto. (max_ii): Ditto. (minmax_i): Ditto. (minmax_ii): Ditto. (min_by_i): Ditto. (max_by_i): Ditto. (minmax_by_i): Ditto. (member_i): Ditto. (take_i): Ditto. (take_while_i): Ditto. (drop_i): Ditto. (drop_while_i): Ditto. (cycle_i): Ditto. * enum.c (each_with_index): Update rdoc. each_with_index() takes argments that are passed through to each(), and a hash preserves key order. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_spawn_internal): remove calling run_exec_options()usa2008-05-122-0/+7
| | | | | | | | because cannot restore after spawn. we'll fix this later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_spawn_internal): need to call run_exec_options() beforeusa2008-05-122-8/+16
| | | | | | | | spawn if the platform doesn't have fork. [ruby-dev:34647] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (ruby_vm_xmalloc): increase malloc_increase only if mallocakr2008-05-122-5/+13
| | | | | | | | | | succeeds. failed malloc size can be huge. it may increase malloc_limit too big which cause less GC and memory full. (ruby_vm_xrealloc): ditto. (rb_objspace): make params.limit and params.increase size_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_prepare_re): made non static with small refactoring.matz2008-05-124-6/+17
| | | | | | | * ext/strscan/strscan.c (strscan_do_scan): should adjust encoding before regex searching. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (is_defined): add NODE_OP_ASGN_{OR,AND}. "defined?(a||=1)"matz2008-05-122-0/+7
| | | | | | should not operate assignment. [ruby-dev:34645] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bigzero_p): check from MSB to LSB. [ruby-dev:34649]akr2008-05-123-1/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e