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

45995 Коммитов

Автор SHA1 Сообщение Дата
shyouhei 20c72dc89d ruby tool/update-deps --fix
Onigumo 6 (r57045) introduced new onigumo.h header file, which is
required from quite much everywhere.  This commit adds necessary
dependencies.

Note: ruby/oniguruma.h now includes onigumo.h,
      ruby/io.h includes oniguruma.h,
      ruby/encoding.h also includes oniguruma.h,
      and internal.h includes encoding.h.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-22 06:00:18 +00:00
svn 6969f355bd * 2017-03-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-22 01:58:17 +00:00
nobu 120dfdd582 gemify stringio
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-22 01:58:17 +00:00
nobu 6411b4a426 Download Unicode data by appveyor [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-21 08:03:49 +00:00
nobu 3805c4442b tool/downloader.rb: dryrun option [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-21 07:19:23 +00:00
nobu f0e6e47999 string.c: use the usable size
* string.c (rb_str_change_terminator_length): when called after
  the content has been copied, old terminator length no longer
  makes sense.  use the whole usable size instead of capacity
  without terminator.  [ruby-core:80257] [Bug #13339]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-21 05:28:38 +00:00
nobu c8d66b5d82 stringio.c: check range
* ext/stringio/stringio.c (strio_ungetc): raise RangeError instead
  of TypeError at too big value, as well as IO#ungetc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-21 03:15:57 +00:00
nobu 853ab8662f stringio.c: check character code
* ext/stringio/stringio.c (strio_ungetc): check if the character
  code is valid in the encoding.  reported by Ahmad Sherif
  (ahmadsherif) at https://hackerone.com/reports/209593.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-21 03:15:56 +00:00
kazu d3cd2e618c link to README.win32 instead of mentioning it in plain text
[Fix GH-1538][ci skip]
Author:    Rouan Wilsenach <Rouan.Wilsenach@tesglobal.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-21 00:11:46 +00:00
svn d6a197ca92 * 2017-03-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-20 20:30:26 +00:00
stomar 56abb1cdd8 docs for creating arrays
* array.c: [DOC] add example for Array.new with block and index.
  Reported by Don Cruickshank.  [ruby-core:68442] [Bug #10944]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-20 20:30:25 +00:00
hsbt 719262eeda Added initial gemspec for mathn.
[Feature #13335]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-20 07:07:49 +00:00
nobu 57d6dd5a46 Avoid integer overflow in sprintf()
merged ff03a9a61c

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-20 01:36:08 +00:00
nobu f31bb33a3b sprintf.c: string limits
* sprintf.c (ruby__sfvwrite): use long instead of size_t due to
  string limits.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-20 01:33:08 +00:00
svn f956ed1061 * 2017-03-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-19 15:01:06 +00:00
stomar 58c3935ec9 improve docs for URI::Generic
* lib/uri/generic.rb: [DOC] expand docs for URI::Generic#normalize
  to clarify what normalization means here.
  Reported by Robert Gleeson.  [ruby-core:58430] [Bug #9127]

* lib/uri/generic.rb: [DOC] fix indent for correct code block detection.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-19 15:01:05 +00:00
nobu f30ed02b8a sprintf.c: use FILL
* sprintf.c (rb_str_format): use FILL and FILL_ macros instead of
  while loop.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-19 12:46:31 +00:00
stomar d8bf178531 date_core.c: fix error in DateTime docs
* ext/date/date_core.c: [DOC] fix format string for DateTime#rfc3339.
  Reported by Andreas Rayo Kniep.  [ruby-core:68418] [Bug #10936]

* ext/date/date_core.c: [DOC] ditto for DateTime#iso8601 and
  DateTime#xmlschema; other small improvements.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-19 09:51:29 +00:00
nobu 976becf7eb vm_args.c: arity check of lambda
* vm_eval.c (rb_yield_lambda): new function which yields an array
  to a proc and splat to a lambda.  mainly for Enumerable only.

* vm_args.c (setup_parameters_complex): remove special lambda
  splatting for [Bug #9605].  [ruby-core:77065] [Bug #12705]

* vm_insnhelper.c (vm_callee_setup_block_arg): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-19 01:11:12 +00:00
nobu a9d575e507 test_lambda.rb: remove duplcate tests
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18 15:58:13 +00:00
svn a633115f7a * 2017-03-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18 15:30:15 +00:00
nobu 1de013b3da test_lambda.rb: refine test
* test/ruby/test_lambda.rb (test_lambda_as_iterator): refine a
  test for the intention of the original report.
  [ruby-core:61340] [Bug #9605]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18 15:30:14 +00:00
nobu 49455d6cdc vm_args.c: pass block
* vm_args.c (refine_sym_proc_call): pass block to the method when
  using refinements.  [ruby-core:80219] [Bug #13325]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18 14:22:15 +00:00
nobu adb3f250fe vm.c: fix up r58012
* vm.c (invoke_iseq_block_from_c): fix stack region length.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18 13:15:15 +00:00
nobu 7768312c1d vm.c: guard arguments [EXPERIMENTAL]
* vm.c (invoke_iseq_block_from_c): guard arguments on stack, not
  to be clobbered during splatting.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18 11:29:35 +00:00
nobu 655aa318db .gdbinit: suppress gdb message [ci skip]
* .gdbinit (rp): check number of instance variables to get rid of
  "Invalid number 0 of repetitions."  message at an empty object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18 10:37:53 +00:00
nobu c85cdc12a4 .gdbinit: RArray in history [ci skip]
* .gdbinit (rp): put the contents of RArray in value history, for
  later use.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18 10:19:52 +00:00
duerst a5330fa9ea fix accidental reversal of r57997 in r58000
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18 01:35:03 +00:00
stomar fbaee79ec0 io.c: improve docs
* io.c: [DOC] improve and harmonize docs for IO#read and ARGF#read;
  fix invalid example code for IO#read to make it syntax highlighted.

* io.c: [DOC] various improvements for docs of IO, ARGF, and Kernel:
  fix indent to ensure correct code block detection; sync "outbuf"
  paragraph for {IO,ARGF}#read, {IO,ARGF}#readpartial, and IO#sysread;
  fix formatting of call-seq's; improve Kernel#open example to use nil?;
  fix RDoc markup and typos.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17 20:48:51 +00:00
svn b15f8473d7 * 2017-03-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17 19:59:57 +00:00
normal cad4591086 remove branches in dmark and dfree GC callbacks
dmark and dfree callbacks are never called in gc.c for NULL
DATA_PTR values, not even for zombie objects.

* compile.c (ibf_loader_mark): remove branch for pointer validity
* compile.c (ibf_loader_free): ditto
* cont.c (cont_free): ditto
* cont.c (fiber_free): ditto
* dir.c (dir_free): ditto
* ext/stringio/stringio.c (strio_mark): ditto
* proc.c (binding_free): ditto
* thread_sync.c (mutex_free): ditto
* vm.c (thread_free): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17 19:59:56 +00:00
kazu 3a55e8a436 fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17 13:24:14 +00:00
nobu f31307d12d vm.c: check stack
* vm.c (invoke_iseq_block_from_c): check stack overflow before
  pushing arguments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17 10:08:02 +00:00
duerst 67c1197835 clarifiy 'codepoint' in documentation of String#each_codepoint
Make sure it's clear that the returned values are not Unicode codepoints
for encodings other than UTF-8/UTF-16(BE|LE)/UTF-32(BE|LE).

[ci skip] [Bug #13321]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17 02:24:53 +00:00
svn 77e1c20b8a * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17 01:29:24 +00:00
hsbt fa59a2ea80 Merge rubygems-2.6.11
This version fixed regression of rubygems-2.6.10.
  https://github.com/rubygems/rubygems/pull/1856

  See details of changelogs for 2.6.11 release:
  adfcf40502/History.txt (L3)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17 01:29:22 +00:00
normal 9eb94b4dc1 deduplicate static rb_str_format format strings
Anybody who hits these code paths can hit them again in the
future, so try deduplicating across multiple runs of these
methods to reduce garbage.

* string.c (str_upto_each): fstring on "%.*d"
* strftime.c (rb_strftime_with_timespec): fstring on "%0*d"

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17 00:55:55 +00:00
normal 312ac7f0a1 deduplicate File::NULL string
"/dev/null" is a common sight for pre-1.9.3-compatible code
targeting *nix systems, so deduplicate it here, as well.

* file.c (Init_File): use fstring for File::NULL

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17 00:55:50 +00:00
normal 05404cba6e deduplicate "/", ":" and "\n" strings
"/" and ":" are always statically registered in symbol.c (Init_op_tbl),
and "\n" is a commonly seen in source code.

* file.c (Init_File): fstring on File::SEPARATOR and File::PATH_SEPARATOR
* io.c (Init_IO): fstring on rb_default_rs ("\n")

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17 00:55:45 +00:00
normal adce0ea944 NEWS: document shorter opt_str_freeze usage
Users do not read commit messages, but maybe they read NEWS.

r57828 ("compile.c: apply opt_str_freeze to String#-@ (uminus)")

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16 23:17:14 +00:00
svn ec03990554 * 2017-03-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16 20:58:59 +00:00
stomar 0bb1a6cbe0 bignum.c: [DOC] typos and grammar
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16 20:58:58 +00:00
nobu f8d01bcb57 rational.c: initialize n
* rational.c (read_num): `n` was used uninitialized when the
  string started with a period.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16 06:51:24 +00:00
nobu a2ac0982cd rational.c: float denom
* rational.c (parse_rat): allow float as a denominator as well as
  a numerator.  [ruby-core:79104] [Bug #13134]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16 03:35:29 +00:00
nobu 62fb6147cd rational.c: read_num
* rational.c (read_num): use rb_int_parse_cstr to parse integer
  parts, and make String#to_r consistent with #to_i and #to_f.
  [ruby-core:80098] [Bug #13105]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16 03:32:16 +00:00
nobu 92e2a7048e bignum.c: rb_int_parse_cstr
* bignum.c (rb_int_parse_cstr): extend rb_cstr_parse_inum with
  flags.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16 03:21:12 +00:00
nobu a441e89c78 test_rational.rb: invalid exponent
* test/ruby/test_rational.rb (test_parse): more checks for invalid
  exponent.  [ruby-core:80098] [Bug #13105]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16 03:05:34 +00:00
nobu 1a6f2391ea test_rational.rb: duplicate assertions
* test/ruby/test_rational.rb (test_parse): remove duplicate
  assertions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16 02:02:47 +00:00
nobu b296e29035 rational.c: zero division
* rational.c (read_rat_nos): denominator cannot be 0, raise zero
  division in that case.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16 01:53:52 +00:00
svn 1e07906a42 * 2017-03-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16 00:43:08 +00:00