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

61996 Коммитов

Автор SHA1 Сообщение Дата
Kazuhiro NISHIYAMA 61743f0c83
Add tests of nested multibyte path and DirectoryIndex 2020-06-22 17:31:07 +09:00
Kazuhiro NISHIYAMA d231b8f95b
Fix remove_entry error when path encoding is not compatible UTF-8 2020-06-22 17:11:24 +09:00
Kazuhiro NISHIYAMA 48d7ebe6fc
Check symlink in tmpdir and do not use empty path 2020-06-22 17:11:23 +09:00
Takashi Kokubun 4c5780e51e
Share warmup logic across MJIT benchmarks 2020-06-22 00:54:27 -07:00
Takashi Kokubun faf93e4545
The RUBYOPT= comment is no longer needed 2020-06-22 00:20:30 -07:00
Takashi Kokubun 8838600c1e
Stop relying on `make benchmark`'s `-I$(srcdir)/benchmark/lib`
These days I don't use `make benchmark`. The YAML files should be
executable with bare `benchmark-driver` CLI without passing
`RUBYOPT=-Ibenchmark/lib`.
2020-06-22 00:17:10 -07:00
Takashi Kokubun 7658a0f8fe
Try increasing read_timeout a little more
It failed again
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3018488
2020-06-21 23:21:48 -07:00
Takashi Kokubun eed4aaa0bf
Increase read_timeout for --jit-wait
This tries to fix a random failure like
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3017837
2020-06-21 16:16:24 -07:00
Nobuyoshi Nakada 54ad2bd6d0
Use canary cond also if not VM_CHECK_MODE to suppress warnings 2020-06-22 06:19:04 +09:00
git 0e3ead344c * 2020-06-22 [ci skip] 2020-06-22 02:27:23 +09:00
Takashi Kokubun d9f608b686
Verify builtin inline annotation with VM_CHECK_MODE (#3244)
* Verify builtin inline annotation with VM_CHECK_MODE

* Remove static to fix the link issue on MJIT
2020-06-21 10:27:04 -07:00
Yusuke Endoh aec8e6d379 test/ruby/test_jit.rb: Change the condition to detect RHEL 7.1 s390x 2020-06-21 23:14:30 +09:00
Takashi Kokubun ec07e2de1a
Increase read timeout of FTP tests with --jit-wait
Trying to eliminate some newer random failures
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3016543
2020-06-21 02:14:34 -07:00
Takashi Kokubun 426db4cd90
Fix -Wmaybe-uninitialized at vm_invoke_block 2020-06-21 00:34:39 -07:00
Nobuyoshi Nakada 995923b7f9
[DOC] Mentioned that `Time.parse` method is not validator 2020-06-21 16:16:15 +09:00
Nobuyoshi Nakada 956d187223
[ruby/date] [DOC] Mentioned alternative `strptime` methods
https://github.com/ruby/date/commit/5f4ac92947
2020-06-21 16:16:15 +09:00
Nobuyoshi Nakada 67e544cbe1
[ruby/date] [DOC] Emphasized that `parse` methods are not validators
https://github.com/ruby/date/commit/81a057db11
2020-06-21 16:16:15 +09:00
Takashi Kokubun 538276aa77
Skip a test_jit with builtin for rhel_zlinux
Either 95b0fed371 or 7561db8c00 started to cause
https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel_zlinux/ruby-master/log/20200621T053303Z.fail.html.gz

But so far no idea why it's happening. Until I get direct ssh access to
debug the details, let me skip this as it's essentially not ruby's fault.
2020-06-20 23:25:16 -07:00
Nobuyoshi Nakada ccd2f99e71
Prefer more descriptive assertion methods 2020-06-21 11:31:48 +09:00
Nobuyoshi Nakada 838d695c16
Prefer ruby_install_name as runner
`Gem::Commands::EnvironmentCommand` expects that `Gem.ruby` has
the transformed basename.
2020-06-21 10:34:07 +09:00
Takashi Kokubun 7561db8c00
Introduce Primitive.attr! to annotate 'inline' (#3242)
[Feature #15589]
2020-06-20 17:13:03 -07:00
Nobuyoshi Nakada d95249ade3
C-expression does not include a semicolon 2020-06-21 08:14:49 +09:00
git cc14319b71 * 2020-06-21 [ci skip] 2020-06-21 06:55:30 +09:00
Takashi Kokubun 95b0fed371
Make Integer#zero? a separated method and builtin (#3226)
A prerequisite to fix https://bugs.ruby-lang.org/issues/15589 with JIT.
This commit alone doesn't make a significant difference yet, but I thought
this commit should be committed independently.

This method override was discussed in [Misc #16961].
2020-06-20 14:55:09 -07:00
Hiroshi SHIBATA b68ddcf30c
[ruby/date] Bump version to 3.0.1
https://github.com/ruby/date/commit/47cca1b76b
2020-06-20 18:35:03 +09:00
Nobuyoshi Nakada 97e8b7d098
[ruby/date] Promote simple date to complex date to load fractional date (Fixes #20)
https://github.com/ruby/date/commit/e022e8b3ce
2020-06-20 18:35:03 +09:00
Jeremy Evans ad156f7e2c
[ruby/date] Fix cannot load complex into simple error when loading marshal dump (Fixes #20)
This problem exists because Marshal.load calls Date.allocate, which
uses a SimpleDateData.  There doesn't seem to be any support for
taking an existing Date instance and converting it from SimpleDateData
to ComplexDateData.  Work around this issue by making Date.allocate
use a ComplexDateData.  This causes problems in Date#initialize,
so remove the Date#initialize method (keeping the date_initialize
function, used internally for Date.civil). Alias Date.new to
Date.civil, since they do the same thing.

https://github.com/ruby/date/commit/6bb8d8fa0f
2020-06-20 18:35:03 +09:00
Nobuyoshi Nakada d1af2345c9
Removed space lines 2020-06-20 14:07:45 +09:00
Kazuki Tsujimoto e8b2578d31
Remove unused variables 2020-06-20 11:11:50 +09:00
Yusuke Endoh a3c8ade1b3 test/coverage/test_coverage.rb: Add a test for [Bug #16967] 2020-06-20 09:28:03 +09:00
Yusuke Endoh 50efa18c6c compile.c: Improve branch coverage instrumentation [Bug #16967]
Formerly, branch coverage measurement counters are generated for each
compilation traverse of the AST.  However, ensure clause node is
traversed twice; one is for normal-exit case (the resulted bytecode is
embedded in its outer scope), and the other is for exceptional case (the
resulted bytecode is used in catch table).  Two branch coverage counters
are generated for the two cases, but it is not desired.

This changeset revamps the internal representation of branch coverage
measurement.  Branch coverage counters are generated only at the first
visit of a branch node.  Visiting the same node reuses the
already-generated counter, so double counting is avoided.
2020-06-20 09:28:03 +09:00
Yusuke Endoh bc0aea0804 compile.c: pass NODE* instead of a quadruple of code location 2020-06-20 09:28:03 +09:00
Yusuke Endoh 4b523e79a0 compile.c (branch_coverage_valid_p): Refactored out 2020-06-20 09:28:03 +09:00
Yusuke Endoh 37cd877dbd compile.c: Use functions for building branch coverage instructions
instead of maros.  Just refactoring.
2020-06-20 09:28:03 +09:00
Jeremy Evans 878af5147d Implement Proc#== and #eql?
Previously, these were not implemented, and Object#== and #eql?
were used.  This tries to check the proc internals to make sure
that procs created from separate blocks are treated as not equal,
but procs created from the same block are treated as equal, even
when the lazy proc allocation optimization is used.

Implements [Feature #14267]
2020-06-19 12:58:25 -07:00
git b3aff6a11c * 2020-06-20 [ci skip] 2020-06-20 00:20:43 +09:00
Kazuhiro NISHIYAMA 640e6c9be6
Use section sign instead of Hiragana Letter A
It can convert to Windows-1252and Windows-31J.

```
"\u00a7".encode("Windows-1252") #=> "\xA7"
"\u00a7".encode("Windows-31J")  #=> "\x{8198}"
```

https://github.com/ruby/ruby/runs/788357527?check_suite_focus=true#step:14:959
```
  1) Failure:
WEBrick::TestFileHandler#test_cjk_in_path [D:/a/ruby/ruby/src/test/webrick/utils.rb:72]:
exceptions on 2 threads:
webrick log start:
  [2020-06-19 14:49:38] ERROR Encoding::CompatibilityError: incompatible character encodings: ASCII-8BIT and Windows-1252
  	D:/a/ruby/ruby/src/lib/webrick/httpservlet/filehandler.rb:341:in `+'
  	D:/a/ruby/ruby/src/lib/webrick/httpservlet/filehandler.rb:341:in `set_filename'
  	D:/a/ruby/ruby/src/lib/webrick/httpservlet/filehandler.rb:310:in `exec_handler'
  	D:/a/ruby/ruby/src/lib/webrick/httpservlet/filehandler.rb:245:in `do_GET'
  	D:/a/ruby/ruby/src/lib/webrick/httpservlet/abstract.rb:105:in `service'
  	D:/a/ruby/ruby/src/lib/webrick/httpservlet/filehandler.rb:241:in `service'
  	D:/a/ruby/ruby/src/lib/webrick/httpserver.rb:140:in `service'
  	D:/a/ruby/ruby/src/lib/webrick/httpserver.rb:96:in `run'
  	D:/a/ruby/ruby/src/lib/webrick/server.rb:307:in `block in start_thread'
```
2020-06-20 00:17:07 +09:00
Kazuhiro NISHIYAMA 32e2440a66
Fix `ERROR ArgumentError: invalid byte sequence in UTF-8`
http://ci.rvm.jp/results/trunk-test@ruby-sky1/3012894
```
/tmp/ruby/v3/src/trunk-test/tool/lib/minitest/unit.rb:199:in `assert': webrick log start: (MiniTest::Assertion)
  [2020-06-19 23:01:59] ERROR ArgumentError: invalid byte sequence in UTF-8
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:336:in `scan'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:336:in `set_filename'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:310:in `exec_handler'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:245:in `do_GET'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/abstract.rb:105:in `service'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:241:in `service'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpserver.rb:140:in `service'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpserver.rb:96:in `run'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/server.rb:307:in `block in start_thread'
```
2020-06-19 23:06:38 +09:00
Kazuhiro NISHIYAMA 97c1782db6
Use filesystem encoding as FileHandler's encoding
instead of `@root.encoding`.
And fallback to ASCII-8BIT when filesystem encoding is US-ASCII.

When `@root.encoding` is not compatible filesystem encoding,
`Encoding::CompatibilityError` raised at `webrick/httpservlet/filehandler.rb:341`.
So `DocumentRoot` must be compatible with filesystem encoding.
2020-06-19 22:56:29 +09:00
Kazuhiro NISHIYAMA 78d4eace02
Do not change local_path encoding in WEBrick::HTTPServlet::DefaultFileHandler
This reverts 750203c514 and 93e6fa1d31
2020-06-19 22:08:19 +09:00
Kazuhiro NISHIYAMA 6fe1919486
Fix failure on mswin CI
https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-master/log/20200619T054159Z.fail.html.gz
```
  1) Failure:
WEBrick::TestFileHandler#test_cjk_in_path [D:/tmp/mswin-build20200619-14304-utgij/ruby/test/webrick/utils.rb:72]:
exceptions on 2 threads:
webrick log start:
  [2020-06-19 16:28:42] ERROR `/あ.txt' not found.

webrick log end
Filesystem encoding is Windows-31J.
<"200"> expected but was
<"404">.
---
<[]> expected but was
<["[2020-06-19 16:28:42] ERROR `/\xE3\x81\x82.txt' not found.\n"]>.
```

`prevent_directory_traversal` treats `path_info` as filesystem encoding.
So path_info should be filesystem encoding in request URL.

On some environments, fallback to ASCII-8BIT when EncodingError.
2020-06-19 20:13:22 +09:00
Kazuhiro NISHIYAMA daa9dcd57e
Hide error location from error message 2020-06-19 20:13:22 +09:00
Nobuyoshi Nakada 63aadc237f [Feature #16254] Use `Primitive.func` style 2020-06-19 18:46:55 +09:00
Nobuyoshi Nakada 49f0fd21e4 [Feature #16254] Allow `Primitive.func` style 2020-06-19 18:46:55 +09:00
Nobuyoshi Nakada d863f4bccd [Feature #16254] Use `__builtin.func` style 2020-06-19 18:46:55 +09:00
Nobuyoshi Nakada c8703a17ce [Feature #16254] Allow `__builtin.func` style 2020-06-19 18:46:55 +09:00
Nobuyoshi Nakada f3e081c6b6
Build configured extension libraries only
Consider the libraries, which remain exts.mk but not listed in
ext/configure-ext.mk, removed.
2020-06-19 15:35:14 +09:00
Nobuyoshi Nakada aa21a775a6
Configure only directories having extconf.rb 2020-06-19 15:13:59 +09:00
Nobuyoshi Nakada 1e7c0ccb0d
Now bundled gems are extracted under .bundle/gems 2020-06-19 14:02:46 +09:00
Nobuyoshi Nakada 0d38a51ec4
Clean exts.mk under each extension library 2020-06-19 12:07:19 +09:00