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

46589 Коммитов

Автор SHA1 Сообщение Дата
k0kubun c26a9a7338 Fix strange indentation
which I introduced at r58773.
Hard tabs and spaces are mixed...

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-18 15:13:30 +00:00
svn 0ea0f07f9c * 2017-05-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-18 15:06:48 +00:00
nobu 7cb0b3159f common.mk: path in parse.c
* common.mk (parse.c): replace source file name in #line pragmas
  with the path in the source directory, so that binary utilities,
  e.g. gcov, can find it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-18 15:06:47 +00:00
nobu 92690b6235 potential memory leak
* dir.c (rb_dir_getwd): get rid of potential memory leak.

* util.c (ruby_getcwd): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-18 11:29:42 +00:00
hsbt 97e824136f Fix a wrong repository name of simplecov.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-18 05:29:04 +00:00
svn 83b7e0bdaa * 2017-05-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-18 02:42:17 +00:00
hsbt 37abc2fb7e Improve CSV parsing performance.
Patch by @joshpencheon (Josh Pencheon)
  [fix GH-1607]

  #### benchmark-ips results
  ```
  trunk:
  Warming up --------------------------------------
                         4.000  i/100ms
  Calculating -------------------------------------
                         39.661  (±10.1%) i/s -      2.352k in 60.034781s
  with-patch:
  Warming up --------------------------------------
                         5.000  i/100ms
  Calculating -------------------------------------
                         60.521  (± 9.9%) i/s -      3.595k in 60.047157s
  ```

  #### memory_profiler resuts

  ```
  trunk:
  allocated memory by class
  -----------------------------------
    35588490  String
     7454320  Array
      294000  MatchData
       37340  Regexp
       11840  Hash
        2400  CSV
        1600  Proc
        1280  Method
         800  StringIO
  with-patch:
  allocated memory by class
  -----------------------------------
    18788490  String
     3454320  Array
      294000  MatchData
       37340  Regexp
       11840  Hash
        2400  CSV
        1600  Proc
        1280  Method
         800  StringIO
  ```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-18 02:42:16 +00:00
ko1 8ffc4094a4 modify r58771.
* spec/rubyspec/command_line/dash_upper_s_spec.rb: enable tests on vboxsf
  (VirtualBox shared directory) and change tests to match /success$/ to
  ignore warnings. This technique is suggested by @unak.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-17 14:43:22 +00:00
k0kubun d06a7cfedd spec/rubyspec: Add `ruby_version_is` guard
for future backport to ruby/spec repository.

See r58772 r58773 r58774.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-17 14:11:01 +00:00
k0kubun 29a2600994 spec/rubyspec: Fix rubyspec for tilde unescape
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-17 13:21:09 +00:00
k0kubun e1b4327545 cgi/util.rb: Don't escape tilde in #escape
to make it compatible with ERB::Util.url_encode.

ext/cgi/escape/escape.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-17 12:34:59 +00:00
k0kubun 53127c2410 erb.rb: Don't encode tilde in #url_encode
Based on patch by madeofcode (Mark Dodwell).
[ruby-core:46168] [Bug #6696] [Fix GH-54]

`~` is a unreserved character.
https://tools.ietf.org/html/rfc3986#section-2.3

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-17 11:58:09 +00:00
ko1 95d3671e94 skip some tests on vboxsf.
* spec/rubyspec/command_line/dash_upper_s_spec.rb:


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-17 09:31:34 +00:00
hsbt 15cb9817a2 Optimize CSV#shift.
[Bug #12373][ruby-core:75462]
  Patch by Yuki Kurihara.

  Benchmark:
  ```
  Warming up --------------------------------------
           csv_shift     1.000  i/100ms
       new_csv_shift     1.000  i/100ms
Calculating -------------------------------------
           csv_shift      1.192  (± 0.0%) i/s -      6.000  in 5.034250s
       new_csv_shift      1.527  (± 0.0%) i/s -      8.000  in 5.243446s

Comparison:
       new_csv_shift:        1.5 i/s
           csv_shift:        1.2 i/s - 1.28x  slower
  ```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-17 07:56:27 +00:00
naruse 0c0f75b798 Treat NULL reference case [Bug #13566]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-17 07:13:47 +00:00
naruse 9cf7985893 Merge Onigmo 6.1.2
1364ae3488

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-17 05:38:37 +00:00
nobu d9b9423ba8 ruby.c: encode script name
* ruby.c (process_options): encode script name to locale encoding
  instead of associate, if UTF-8 path.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-17 04:47:05 +00:00
nobu bd4a419d3e .gdbinit: fix nd_tree
* .gdbinit (nd_tree): use rb_str_tmp_new to get rid of
  `__extension__'.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-17 04:44:12 +00:00
nobu a0b6e36609 test_dir_m17n.rb: read in filesystem encoding
* test/ruby/test_dir_m17n.rb (test_entries_compose): read in
  filesystem encoding instead of default external encoding on
  Windows too.  these two encodings may differ on some
  environments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-17 00:28:01 +00:00
normal 8dbf0f2ac7 Revert "test/test_extilibs.rb: do not check the existence of fiddle"
This reverts r58761 since fiddle is considered critical.
[ruby-core:81201] [ruby-core:81203]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 23:59:01 +00:00
usa 6e7dfec866 ENV["HOME"] is prior as home on Windows
* spec/rubyspec/core/dir/home_spec.rb: ENV["HOME"] is prior as home on Windows.
  reported by ko1.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 23:15:56 +00:00
nobu a540cec984 gmake.mk: test dependency
* defs/gmake.mk (TEST_DEPENDS): check and more tests targets need
  all to be built.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 23:09:34 +00:00
normal c836e8ddd5 test/test_extilibs.rb: do not check the existence of fiddle
libffi is not installed on all systems, and is not needed
for most of the tests.

Tested on a fresh FreeBSD 11.0 VM

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 22:05:39 +00:00
usa b1d57ac688 Should require at spec file, not fixture file
Fixed ERRORs at non-Windows platforms.

* spec/rubyspec/library/win32ole/fixtures/classes.rb (require): removed.

* spec/rubyspec/library/win32ole/win32ole/ole_get_methods_spec.rb (require):
  forgotten to require 'win32ole'.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 16:16:47 +00:00
nobu 00f76201b3 run tests without exts
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 15:47:44 +00:00
usa 10f713e415 Should require WIN32OLE
* spec/rubyspec/library/win32ole/fixtures/classes.rb: should require WIN32OLE
  here because this file causes NameError in parallel spec.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 15:45:25 +00:00
svn ec5e5c098d * 2017-05-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 15:17:40 +00:00
nobu fab2a5ed6b test/unit.rb: fix returning job tokens
* test/lib/test/unit.rb (_run_parallel): flush job tokens after
  quitting workers when normally finished too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 15:17:39 +00:00
nobu ec5184afa7 test_process.rb: compare in UTF-8
* test/ruby/test_process.rb (test_execopts_open_chdir_m17n_path):
  compare directory name in UTF-8.  encoding of `Dir.pwd` is
  affected by filesystem encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 14:53:04 +00:00
nobu ff88c2a9d3 Use raise_error block
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 13:57:18 +00:00
nobu 9bb63a50f5 Mac OS raises EADDRNOTAVAIL but not ECONNREFUSED
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 13:51:17 +00:00
nobu 4cfbc59dc3 Multiple exception classes at raise_error
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 13:51:15 +00:00
usa 8dd82a3e1e * common.mk (help): get rid of make error with nmake.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 13:50:51 +00:00
ko1 975d1cb3d1 restore yes-test-rubyspec
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 13:22:42 +00:00
nobu f2b00e2ff0 follow test-spec
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 13:15:12 +00:00
eregon e838fa81bd Avoid using a class variable in socket specs
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 12:29:44 +00:00
eregon 50349fd5b7 Use a reserved port to test for a non-existing TCP server
* Avoids a race between finding an available port and another process starting a server on it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 12:29:30 +00:00
usa 35da88e634 Rename rubyspec to spec
* common.mk (*-rubyspec): rename to *-spec because rubyspec is historical name.
  of course, *-rubyspec are still available for compatibility.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 12:15:48 +00:00
nobu 000482a173 rb_w32_ugetcwd: UTF-8 version getcwd
* dir.c (rb_dir_getwd): convert from UTF-8.

* win32/win32.c (w32_getcwd): codepage aware getcwd using
  GetCurrentDirectoryW.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 10:25:56 +00:00
hsbt 87acdae43d Strip punctuation from CSV headers in symbol converter.
Patch by @cllns. [Fix GH-957]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 09:32:32 +00:00
hsbt 3b77cb2a64 Added accessor of original line when parsing.
[Feature #11865][ruby-core:72452][fix GH-1170]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 09:17:09 +00:00
usa 59faac613f Search SSL libraries by testing various filename patterns
* ext/openssl/extconf.rb (find_openssl_library): should search by more flexible
  method, especially for LibreSSL on Windows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 08:03:53 +00:00
nobu 66b54b1a4a fix tempfile leaks on Windows
* lib/rubygems/ext/ext_conf_builder.rb (build): needs to close
  before unlink on Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 05:47:53 +00:00
naruse 0e7c81a713 fix words
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 05:02:23 +00:00
ko1 a9b001a4eb skip openssl related tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 04:23:10 +00:00
svn 1fc689d978 * 2017-05-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 00:15:55 +00:00
nobu 6ec37b8f75 enable ruby_w32_codepage on cygwin
* debug.c, localeinit.c: enable ruby_w32_codepage on cygwin too.
  [ruby-core:81163] [Bug #13567]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 00:15:54 +00:00
ko1 f033cfa381 refresh Gem at the end of `teardown`.
* lib/rubygems/test_case.rb (teardown): call `Gem::refresh()` at the
  end of `teardown`.
  On parallel test sometimes fails test process. The reason
  is:
  (1) previous tests remains `Gem::Specification@@stubs` value
      which points to temporary directories and the directories
      are removed by `teardown` method of previous test.
  (2) `require 'rubygems/gem_runner'` in `test_gem_gem_runner.rb`
      tries to require test utility file. However, with strange `@@stubs`
      RubyGems tries to load specification from removed directory.
      `StubSpecification#to_spec` returns `nil` and error will occur.
  The solution this patch employs is to refresh all of parameters
  includes `Gem::Specification@@stubs` by `Gem::refresh()`.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 14:40:07 +00:00
k0kubun 52c738408e erb.rb: Use String#<< instead of #concat
to optimize String concatenation on rendering.

[fix GH-1612]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 13:38:02 +00:00
sorah efd36678e6 [DOC] File#path result can be inaccurate
* file.c(rb_file_path): [DOC] Note that the pathname returned by this
  method can be inaccurate, for instance file gets moved, renamed,
  deleted or is created with File::TMPFILE option.

  Relates to [Feature #13568]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 12:18:55 +00:00