Граф коммитов

43846 Коммитов

Автор SHA1 Сообщение Дата
normal f8d0bdedf1 tool: add descriptions and fix typos
* tool/asm_parse.rb: add description
* tool/change_maker.rb: ditto
* tool/downloader.rb: ditto
* tool/eval.rb: ditto
* tool/expand-config.rb: ditto
* tool/extlibs.rb: ditto
* tool/fake.rb: ditto
* tool/file2lastrev.rb: ditto
* tool/gem-unpack.rb: ditto
* tool/gen_dummy_probes.rb: ditto
* tool/gen_ruby_tapset.rb: ditto
* tool/generic_erb.rb: ditto
* tool/id2token.rb: ditto
* tool/ifchange: ditto
* tool/insns2vm.rb: ditto
* tool/instruction.rb: ditto
* tool/jisx0208.rb: ditto
* tool/merger.rb: ditto
* tool/mkrunnable.rb: ditto
* tool/node_name.rb: ditto
* tool/parse.rb: ditto
* tool/rbinstall.rb: ditto
* tool/rbuninstall.rb: ditto
* tool/rmdirs: ditto
* tool/runruby.rb: ditto
* tool/strip-rdoc.rb: ditto
* tool/vcs.rb: ditto
* tool/vtlh.rb: ditto
* tool/ytab.sed: ditto
* tool/enc-unicode.rb: fix typo
* tool/mk_call_iseq_optimized.rb: ditto
* tool/update-deps: ditto
  [ruby-core:76215] [Bug #12539]
  by Noah Gibbs <the.codefolio.guy@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-02 21:01:04 +00:00
naruse 79f86a67d0 * lib/uri/mailto.rb (initialize): RFC3986_Parser#split sets opaque
only if the URI has path-rootless, not path-empty.
  [ruby-core:76055] [Bug #12498]
  patched by Chris Heisterkamp <cheister@squareup.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-02 09:05:05 +00:00
naruse 1e3fc7dcfa * regcomp.c (noname_disable_map): don't optimize out group 0
Ruby's Regexp doesn't allow normal numbered groups if the regexp
  has named groups. On such case it optimizes out related NT_ENCLOSE.
  But even on the case it can use \g<0>.
  This fix not to remove NT_ENCLOSE whose regnum is 0.
  [ruby-core:75828] [Bug #12454]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-01 19:37:43 +00:00
ngoto 3418a277d8 * string.c: Partially reverts r55547 and r55555.
ChangeLog about the reverted changes are also deleted in this file.
  [Bug #12536] [ruby-dev:49699] [ruby-dev:49702]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-01 18:11:11 +00:00
svn bc1d7b1649 * 2016-07-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-01 17:32:22 +00:00
ngoto 61f2ee0d90 * string.c (str_fill_term): When termlen increases, re-allocation
of memory for termlen should always be needed.
  In this fix, if possible, decrease capa instead of realloc.
  [Bug #12536] [ruby-dev:49699]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-01 17:32:21 +00:00
kazu 6fee4909c8 fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-01 12:00:07 +00:00
ngoto a92a537bf4 * string.c: Specify termlen as far as possible.
Additional fix for [Bug #12536] [ruby-dev:49699].

* string.c (rb_usascii_str_new, rb_utf8_str_new): Specify termlen
  which is apparently 1 for the encodings.

* string.c (str_new0_cstr): New static function to create a String
  object from a C string with specifying termlen.

* string.c (rb_usascii_str_new_cstr, rb_utf8_str_new_cstr): Specify
  termlen by using new str_new0_cstr().

* string.c (str_new_static): Specify termlen from the given encoding
  when creating a new String object is needed.

* string.c (rb_tainted_str_new_with_enc): New function to create a
  tainted String object with the given encoding. This means that
  the termlen is correctly specified. Curretly static function.
  The function name might be renamed to rb_tainted_enc_str_new
  or rb_enc_tainted_str_new.

* string.c (rb_external_str_new_with_enc): Use encoding by using the
  above rb_tainted_str_new_with_enc().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-01 11:24:11 +00:00
ngoto 053c1e08e3 * test/fiddle/test_pointer.rb (test_to_str, test_to_s, test_aref_aset):
Attempt to use independent strings for destructive tests that
  directly modify values on memory by using Fiddle::Pointer.
  [Bug #12537] [ruby-dev:49700]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-01 10:43:07 +00:00
naruse 14d9ceed15 * .gdbinit (rb_ps_thread): show the detail of cfunc in ruby level
backtrace.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-01 09:24:59 +00:00
ngoto 10e28726a1 * string.c (rb_str_subseq, str_substr): When RSTRING_EMBED_LEN_MAX
is used, TERM_LEN(str) should be considered with it because
  embedded strings are also processed by TERM_FILL.
  Additional fix for [Bug #12536] [ruby-dev:49699].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-01 04:50:38 +00:00
ngoto 6734a0c3d9 string.c: Add parentheses to avoid C source code ambiguity. [Bug #12536]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-01 03:58:51 +00:00
naruse 0946cf157a * .gdbinit (rb_count_objects): added gdb version of count_objects().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-01 03:13:41 +00:00
svn 35291b7d5f * 2016-07-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-30 19:36:39 +00:00
naruse 6f10a4af6c * .gdbinit (rb_ps_thread): show ruby level backtrace.
Usually you can call `rb_ps` to show ruby leve backtraces
  for all living threads.
  Note that it can call with core file like `gcore <pid>`
  and `gdb ruby core.<pid>`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-30 19:36:38 +00:00
ngoto f2ee22371b * string.c: Fix memory corruptions when using UTF-16/32 strings.
[Bug #12536] [ruby-dev:49699]

* string.c (TERM_LEN_MAX): Macro for the longest TERM_FILL length,
  the same as largest value of rb_enc_mbminlen(enc) among encodings.

* string.c (str_new, rb_str_buf_new, str_shared_replace): Allocate
  +TERM_LEN_MAX bytes instead of +1. This change may increase memory
  usage.

* string.c (rb_str_new_with_class): Use TERM_LEN of the "obj".

* string.c (rb_str_plus, rb_str_justify): Use str_new0 which is aware
  of termlen.

* string.c (str_shared_replace): Copy +termlen bytes instead of +1.

* string.c (rb_str_times): termlen should not be included in capa.

* string.c (RESIZE_CAPA_TERM): When using RSTRING_EMBED_LEN_MAX,
  termlen should be counted with it because embedded strings are
  also processed by TERM_FILL.

* string.c (rb_str_capacity, str_shared_replace, str_buf_cat): ditto.

* string.c (rb_str_drop_bytes, rb_str_setbyte, str_byte_substr): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-30 10:20:23 +00:00
nobu 893bb61bcb case-folding.rb: define version numbers
* enc/unicode/case-folding.rb: define Unicode version numbers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-30 08:24:11 +00:00
nobu 753ce99eac case-folding.rb: check version numbers
* enc/unicode/case-folding.rb: check if version numbers in each
  data files match.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-30 08:13:28 +00:00
nobu 7d4db05679 test_stringio.rb: reduce retry count
* test/stringio/test_stringio.rb (test_overflow): reduce maximum
  retry count to get rid of timeout on some platforms.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-30 08:13:27 +00:00
nobu 7d1d8b112c Move unicode tables timestamp
* common.mk (.unicode-tables.time): move from the top source
  directory to the unicode source data directory which contains
  its version number.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-30 07:31:06 +00:00
nobu 2282541898 Magic numbers
* ext/cgi/escape/escape.c (optimized_unescape_html): remove magic
  numbers for literal lengths.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-30 05:45:35 +00:00
svn 38d340f62e * 2016-06-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-30 04:16:44 +00:00
nobu 7175ee79ee Initialize ID
* ext/cgi/escape/escape.c (accept_charset): initialize the static
  ID for theha class variable once at first.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-30 04:16:43 +00:00
hsbt c68da0fd49 * ext/psych/lib/psych_jars.rb: removed needless file required to JRuby.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-29 13:24:56 +00:00
rhe c2329831fb openssl: fix for OpenSSL 1.0.0t
* ext/openssl/ossl_ocsp.c: The "reuse" behavior of d2i_ functions does
  not work well with OpenSSL 1.0.0t. So avoid it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-29 13:21:54 +00:00
kazu 685a18c46f fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-29 12:37:37 +00:00
naruse 8fe1d91f62 * insns.def (opt_succ): optimize like r55515. (but this argument is
consntant)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-29 06:23:38 +00:00
nobu 8361dab9cb VC6 error
* win32/win32.c (GetSystemWindowsDirectoryW): use
  GetWindowsDirectoryW for VC6.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-29 04:37:14 +00:00
nobu 91ec3d8fbe VC6 error
* random.c (int_pair_to_real_inclusive): get rid of VC6 compile
  error C2520: conversion from unsigned __int64 to double not
  implemented.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-29 04:37:13 +00:00
nobu df8c48a3f9 Use LONG_LONG
* missing/crypt.h (B64): use LONG_LONG instead of long long
  directly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-29 04:37:12 +00:00
shugo a1d17c5907 * test/ruby/test_refinement.rb: skip
test_prepend_after_refine_wb_miss on ARM or MIPS.
  [ruby-core:76031] [Bug #12491]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-29 03:45:23 +00:00
nobu 86a756ae15 Passed block symbol to proc
* proc.c (passed_block): convert passed block symbol to proc.
  based on the patch by Daisuke Sato in [ruby-dev:49695].
  [Bug #12531]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 23:45:55 +00:00
nobu e3503ee218 Octal mode in un.rb
* lib/fileutils.rb (FileUtils#symbolic_modes_to_i): revert r55524.

* lib/un.rb (install, chmod): support octal mode string.  fix up
  r55513.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 22:03:00 +00:00
svn f29d43a3ec * 2016-06-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 18:42:13 +00:00
naruse 236b5e9778 * bignum.c (rb_big2ulong): the old logic seems to try to avoid
calculating `-(long)(num-1)-1` if `num` is not LONG_MIN. (Note that
  `-LONG_MIN` may be larger than LONG_MAX) But C compilers can
  optimize it into single NEG instruction.
  Therefore those two conditions can be single if-body.

* bignum.c (rb_big2long): ditto.

* bignum.c (rb_big2ull): ditto.

* bignum.c (rb_big2ll): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 18:42:12 +00:00
nobu c9df0f82b7 PStore::CHECKSUM_ALGO
* lib/pstore.rb (PStore::CHECKSUM_ALGO): extract the algorithm for
  checksum, instead of qualified names for each times.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 13:55:02 +00:00
nobu cafeeb4bec bootstraptest/runner.rb may run on older ruby
* bootstraptest/runner.rb: do not use safe navigation operator.
  this runner may run on older ruby.  partially revert r53110
  (GH-1142 patched by @mlarraz).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 13:29:38 +00:00
arton f2f16f2a35 Tue Jun 28 22:09:09 2017 Akio Tajima <artonx@yahoo.co.jp>
* lib/fileutils.rb: rescue Errno:EACCES for chown.
	  [Bug #12520]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 13:14:48 +00:00
nobu d34b3c9a0f Octal mode
* lib/fileutils.rb (symbolic_modes_to_i): support octal mode
  string.  fix up r55513.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 12:33:28 +00:00
ngoto 8b251c6c2c * ext/digest/md5/md5ossl.h: Remove excess semicolons.
Suppress warning on Solaris with Oracle Solaris Studio 12.
  [ruby-dev:49692] [Bug #12524]
    
* ext/digest/md5/md5cc.h: ditto.
* ext/digest/sha1/sha1cc.h: ditto.
* ext/digest/sha1/sha1ossl.h: ditto.
* ext/digest/sha2/sha2cc.h: ditto.
* ext/digest/sha2/sha2ossl.h: ditto.
* ext/openssl/ossl_pkey_rsa.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 09:42:29 +00:00
nobu ad72430863 Move CaseTest
* test/ruby/enc/test_case_comprehensive.rb (CaseTest): move under
  the test case not to pollute the global name space.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 07:04:13 +00:00
nobu 023aaa51a2 Skip unavailable tests
* test/ruby/enc/test_case_comprehensive.rb: noting to test if
  Unicode data files are available.
  [ruby-core:76160] [Bug #12433]
* test/test_unicode_normalize.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 06:56:50 +00:00
nobu 5026a663ab Cache no proxy case
* lib/net/http.rb (Net::HTTP#proxy_uri): cache the case no proxy
  is used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 06:20:20 +00:00
nobu 8ff99deda9 Use conditional operator
* lib/net/http.rb (Net::HTTP#proxy): use conditional operator to
  get rid of confusing ruby-mode.el.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 06:19:58 +00:00
naruse 0e585b37ec Revert "Use gperf 3.0.4"
It is wrong commit.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 04:38:32 +00:00
nobu f1707e44fb Fix typo [ci skip]
* object.c (rb_mod_eqq): [DOC] Fix typo in RDoc.  [Fix GH-1393]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 00:56:31 +00:00
svn fc1b4bd686 * 2016-06-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-27 18:30:16 +00:00
naruse 1e791f438b * insns.def (opt_plus): use `- 1` instead of `& (~1)` to allow
compilers to use x86 LEA instruction (3 operand).
  Even if 3 operand LEA's latency is 3 cycle after SandyBridge,
  it reduces code size and can be faster because of super scalar.

* insns.def (opt_plus): calculate and use rb_int2big.
  On positive Fixnum overflow, `recv - 1 + obj` doesn't carry
  because recv's msb and obj's msb are 0, and resulted msb is 1.
  Therefore simply rshift and cast as signed long works fine.
  On negative Fixnum overflow, it will carry because both arguments'
  msb are 1, and resulted msb is also 1.
  In this case it needs to restore carried sign bit after rshift.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-27 18:30:12 +00:00
naruse 4b31485ad8 Use gperf 3.0.4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-27 18:30:12 +00:00
nobu 2a5183c2e4 FileUtils#install: symbolic mode
* lib/fileutils.rb (FileUtils#install): accecpt symbolic mode, as
  well as chmod.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-27 07:58:34 +00:00