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

47923 Коммитов

Автор SHA1 Сообщение Дата
nobu 3ca9f25b29 ripper/lexer.rb: remove double quotes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-30 06:42:24 +00:00
glass 9189cf5793 configure.ac: use m4_version_prereq
* configure.ac: use m4_version_prereq to check
  running autoconf version.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-30 06:30:44 +00:00
ktsj 917bc68772 test_find.rb: improve branch coverage
* test/test_find.rb (test_to_path): add a test
  for to_path conversion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-30 03:31:32 +00:00
nobu 16759238ad string.c: fix ASCII-only on succ
* string.c (str_succ): clear coderange cache when no alpha-numeric
  character case, carried part may become ASCII-only.
  [ruby-core:83062] [Bug #13952]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-30 00:01:23 +00:00
nobu 623cf29787 sizes.c.tmpl: prototype
* template/sizes.c.tmpl (Init_limits): turned a K&R style
  declaration into a prototype declaration.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-29 23:41:19 +00:00
svn da7303e537 * 2017-09-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-29 17:19:38 +00:00
sonots b5b2bd86f1 test_etc.rb: fix test_getgrnam for duplicated group names
* test/etc/test_etc.rb: Etc.getgrnam would not return the first entry in the order of Etc.group for duplicated group names.

follow-up: [Bug #6935]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-29 17:19:37 +00:00
nobu 3133a5c971 configure.ac
* configure.ac: renamed configure.in.  [Feature #13946]

* Makefile.in, common.mk, ext/rbconfig/sizeof/depend: use
  configure.ac.

* README.ja.md, README.md: update document for configure.ac.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-29 13:21:17 +00:00
kazu 5723d9fd34 Use unpack1 instead of unpack and `[0]`
[Feature #13943][ruby-core:83027]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-29 11:00:00 +00:00
nobu 2d42119903 string.c: ASCII-incompatible is not ASCII only
* string.c (tr_trans): ASCII-incompatible encoding strings cannot
  be ASCII-only even if valid.  [ruby-core:83056] [Bug #13950]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-29 08:15:50 +00:00
nobu d35b5a4726 pack.c: unpack "M" may be ASCII only
* pack.c (pack_unpack_internal): set ASCII only properly on "M",
  may be ASCII only.  [ruby-core:83055] [Bug #13949]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-29 08:00:47 +00:00
svn b455b8391d * 2017-09-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-29 07:43:23 +00:00
nobu 9bc73cd81f array.c: improve operations on small arrays
[Feature #13884]

Reduce number of memory allocations for "and", "or" and "diff"
operations on small arrays

Very often, arrays are used to filter parameters and to select
interesting items from 2 collections and very often these
collections are small enough, for example:

```ruby
SAFE_COLUMNS = [:id, :title, :created_at]

def columns
  @all_columns & SAFE_COLUMNS
end
```

In this patch, I got rid of unnecessary memory allocations for
small arrays when "and", "or" and "diff" operations are performed.

name             | HEAD  | PATCH
-----------------+------:+------:
array_small_and  | 0.615 | 0.263
array_small_diff | 0.676 | 0.282
array_small_or   | 0.953 | 0.463

name             | PATCH
-----------------+------:
array_small_and  | 2.343
array_small_diff | 2.392
array_small_or   | 2.056

name             | HEAD  | PATCH
-----------------+------:+------:
array_small_and  | 1.429 | 1.005
array_small_diff | 1.493 | 0.878
array_small_or   | 1.672 | 1.152

name             | PATCH
-----------------+------:
array_small_and  | 1.422
array_small_diff | 1.700
array_small_or   | 1.452

Author:    Dmitry Bochkarev <dimabochkarev@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-29 07:43:22 +00:00
shirosaki ff6573b696 test_dln.rb: fix path separator on MinGW
* test/-ext-/win32/test_dln.rb (TestDln#test_check_imported):
  RbConfig::CONFIG["PATH_SEPARATOR"] is : which is a separator on
  msys2 shell building ruby. Use File::PATH_SEPARATOR ; on test.
  [Bug #13642] [ruby-core:81623]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-28 13:55:48 +00:00
shirosaki fd50c2ee44 io.c: fix segfault with closing socket on Windows
* io.c (fptr_finalize_flush): add an argument to keep GVL.
* io.c (fptr_finalize): adjust for above change.
* io.c (io_close_fptr): closing without GVL causes another
  exception while raising exception in another thread. This causes
  segfault on Windows. Keep GVL while closing when another thread
  raises.
  [Bug #13856] [ruby-core:82602]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-28 13:43:21 +00:00
naruse c4130b0958 Net::HTTP.new: Support no_proxy parameter [Feature #11195]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-28 10:51:37 +00:00
naruse ec7c76c446 URI::Generic: Separate no_proxy handling
To share with Net::HTTP. see #11195

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-28 10:51:31 +00:00
svn e4136c7bee * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-28 09:20:00 +00:00
eregon 52d2636f3e Update to ruby/spec@691755d
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-28 09:19:59 +00:00
eregon c555bd7f01 Update to ruby/mspec@c135328
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-28 09:19:19 +00:00
nobu 140daa5212 test_io_console.rb: flush
* test/io/console/test_io_console.rb: flush to ensure the second
  data is sent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-28 02:51:41 +00:00
svn d21aab2d3e * 2017-09-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-27 21:55:33 +00:00
naruse be4bfe4a85 Remove DevKit path, change zlib link
by MSP-Greg <MSP-Greg@users.noreply.github.com>
fix https://github.com/ruby/ruby/pull/1708

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-27 21:55:32 +00:00
kazu 8aebd7e9eb Fix exception class [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-27 12:32:57 +00:00
duerst dbb6e0a47c improve grammar in documentation of Array#bsearch [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-27 07:47:13 +00:00
nobu a59837ddd0 pty.c: shrink repeated device names
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-27 05:27:07 +00:00
nobu 37a9da68a7 objspace_dump.c: remove unnecessary break
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-27 05:27:06 +00:00
nobu 253fd5fe6b ext: adjust indent [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-27 05:08:53 +00:00
nobu 65d7479920 complex.c: no overflow
* complex.c (rb_complex_infinite_p): get rid of overflow and
  unnecessary multiplication.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-27 02:55:03 +00:00
nobu 241ba38d70 complex.c: no overflow
* complex.c (rb_complex_finite_p): get rid of overflow and
  unnecessary multiplication.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-27 02:38:51 +00:00
svn 9eed577cf5 * 2017-09-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-27 01:01:27 +00:00
nobu ea5e91b51f * complex.c: fix Complex#infinite? return value. Because nucomp_abs never returns negative value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-27 01:01:26 +00:00
nobu b9031d7088 Show rb_data_type_t definition [ci skip]
[Fix GH-1707]
Author:    hkdnet <hkdnet@users.noreply.github.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-26 23:28:07 +00:00
nobu 2461376aee Fix a reference [ci skip]
[Fix GH-1706]
Author:    hkdnet <hkdnet@users.noreply.github.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-26 23:28:06 +00:00
naruse 4f4d724720 Make retries for Net::HTTP configurable [Feature #10674]
by stereobooster
fix https://github.com/ruby/ruby/pull/1654

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-26 14:00:25 +00:00
nobu fbb9e6c1eb parse.y: moved duplicate conditions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-26 13:40:14 +00:00
nobu 33118bf77b Suppress warnings by other than self-assignments
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-26 12:21:51 +00:00
k0kubun 9d389d6510 erb.rb: drop unreachable method
This seems to be unreachable from first introduction at r21286.

In ERB implementation, `#empty?` is only called for each member of
return value of `String#scan`, and `ERB::Compiler::PercentLine` is never
returned from `String#scan`.

Also, in `ERB::Compiler#compile`, as it's yielded only when stag is nil,
methods called to `ERB::Compiler::PercentLine` object yielded from
`ERB::Compiler::TrimScanner#scan` are only: `#nil?`, `#==`, `to_s`.

Thus `ERB::Compiler::PercentLine#empty?` is never used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-26 11:50:07 +00:00
k0kubun 054e4bc4fd test_erb.rb: add test cases for uncovered methods
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-26 11:30:45 +00:00
k0kubun 08bb7d3d19 test_features.rb: fix unused variable warning
test/csv/test_features.rb:357: warning: assigned but unused variable - csv

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-26 10:45:14 +00:00
mame 732fe8014a run-lcov.rb: support overwritten tmpdir path
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-26 04:59:39 +00:00
mame d297bb1496 tool/run-lcov.rb: Filter tmp files out
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-26 04:51:09 +00:00
nobu 66c9d4f55e Release gvl while doing (f)stat
At the moment rb_stat function is blocking. This patch changes the
behaviour to release the gvl while waiting for OS to return from
f(stat).

There is behaviour impact, but not significant (times are for 100000
iterations):

   $ ~/releaseruby_patch/bin/ruby bench.rb
Rehearsal ------------------------------------------------
File.exist?:   0.036412   0.056616   0.093028 (  0.093075)
--------------------------------------- total: 0.093028sec

                   user     system      total        real
File.exist?:   0.042953   0.049783   0.092736 (  0.092804)

   $ ~/releaseruby_no_patch/bin/ruby bench.rb
Rehearsal ------------------------------------------------
File.exist?:   0.056094   0.026293   0.082387 (  0.082389)
--------------------------------------- total: 0.082387sec

                   user     system      total        real
File.exist?:   0.037250   0.046702   0.083952 (  0.083956)

Based on the patch by Wolf <wolf@wolfsden.cz> at [ruby-core:83012],
with using `rb_thread_io_blocking_region` for `fstat`.
[Bug #13941]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-26 04:13:37 +00:00
nobu c57eb143ec test_drb.rb: removed extra spaces
* test/drb/test_drb.rb (TestDRbLarge#test_02_large_ary): removed
  unnecessary extra spaces which make the following parentheses an
  expression.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-26 00:07:41 +00:00
nobu 6a169a499b vm.c: unused function
* vm.c (rb_vm_jump_tag_but_local_jump): no longer used since
  r51292.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-25 21:52:00 +00:00
nobu d352d0a0a7 vm.c: fetch retval iff necessary
* vm.c (rb_vm_make_jump_tag_but_local_jump): get rid of fetching
  retval when it is not used.  it is necessary for local jump
  state only.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-25 21:51:56 +00:00
svn 4ea46ca0f5 * 2017-09-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-25 17:38:43 +00:00
naruse 42d4f9ea8b Switch Build to use 2.4 with certs files
patched by MSP-Greg <MSP-Greg@users.noreply.github.com>
fix https://github.com/ruby/ruby/pull/1702

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-25 17:38:42 +00:00
naruse 56f91c6ec5 HTTPHeader#add_field should allow binary [Bug #13926]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-25 14:28:53 +00:00
mame 0c482713dd tool/run-lcov.rb: Filter test files out
And refactoring.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-25 14:04:59 +00:00