aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix -Wmaybe-uninitialized at vm_invoke_blockTakashi Kokubun2020-06-211-0/+1
|
* [DOC] Mentioned that `Time.parse` method is not validatorNobuyoshi Nakada2020-06-211-0/+5
|
* [ruby/date] [DOC] Mentioned alternative `strptime` methodsNobuyoshi Nakada2020-06-211-3/+6
| | | | https://github.com/ruby/date/commit/5f4ac92947
* [ruby/date] [DOC] Emphasized that `parse` methods are not validatorsNobuyoshi Nakada2020-06-211-4/+15
| | | | https://github.com/ruby/date/commit/81a057db11
* Skip a test_jit with builtin for rhel_zlinuxTakashi Kokubun2020-06-201-0/+1
| | | | | | | | 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.
* Prefer more descriptive assertion methodsNobuyoshi Nakada2020-06-211-11/+11
|
* Prefer ruby_install_name as runnerNobuyoshi Nakada2020-06-211-2/+3
| | | | | `Gem::Commands::EnvironmentCommand` expects that `Gem.ruby` has the transformed basename.
* Introduce Primitive.attr! to annotate 'inline' (#3242)Takashi Kokubun2020-06-207-2/+74
| | | [Feature #15589]
* C-expression does not include a semicolonNobuyoshi Nakada2020-06-211-1/+1
|
* * 2020-06-21 [ci skip]git2020-06-211-1/+1
|
* Make Integer#zero? a separated method and builtin (#3226)Takashi Kokubun2020-06-208-8/+44
| | | | | | | 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].
* [ruby/date] Bump version to 3.0.1Hiroshi SHIBATA2020-06-201-1/+1
| | | | https://github.com/ruby/date/commit/47cca1b76b
* [ruby/date] Promote simple date to complex date to load fractional date ↵Nobuyoshi Nakada2020-06-201-4/+7
| | | | | | (Fixes #20) https://github.com/ruby/date/commit/e022e8b3ce
* [ruby/date] Fix cannot load complex into simple error when loading marshal ↵Jeremy Evans2020-06-202-2/+9
| | | | | | | | | | | | | | | 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
* Removed space linesNobuyoshi Nakada2020-06-201-2/+0
|
* Remove unused variablesKazuki Tsujimoto2020-06-201-1/+0
|
* test/coverage/test_coverage.rb: Add a test for [Bug #16967]Yusuke Endoh2020-06-201-0/+20
|
* compile.c: Improve branch coverage instrumentation [Bug #16967]Yusuke Endoh2020-06-203-63/+150
| | | | | | | | | | | | | | 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.
* compile.c: pass NODE* instead of a quadruple of code locationYusuke Endoh2020-06-201-82/+37
|
* compile.c (branch_coverage_valid_p): Refactored outYusuke Endoh2020-06-201-8/+10
|
* compile.c: Use functions for building branch coverage instructionsYusuke Endoh2020-06-201-54/+65
| | | | instead of maros. Just refactoring.
* Implement Proc#== and #eql?Jeremy Evans2020-06-195-9/+93
| | | | | | | | | | 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-20 [ci skip]git2020-06-201-1/+1
|
* Use section sign instead of Hiragana Letter AKazuhiro NISHIYAMA2020-06-201-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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' ```
* Fix `ERROR ArgumentError: invalid byte sequence in UTF-8`Kazuhiro NISHIYAMA2020-06-191-1/+1
| | | | | | | | | | | | | | | | | 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' ```
* Use filesystem encoding as FileHandler's encodingKazuhiro NISHIYAMA2020-06-192-10/+14
| | | | | | | | | 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.
* Do not change local_path encoding in WEBrick::HTTPServlet::DefaultFileHandlerKazuhiro NISHIYAMA2020-06-191-1/+1
| | | | This reverts 750203c514e0e9a49f7d53fb54084e6844fca42a and 93e6fa1d319d19ce7fba37e4b9924862447b9f38
* Fix failure on mswin CIKazuhiro NISHIYAMA2020-06-192-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Hide error location from error messageKazuhiro NISHIYAMA2020-06-191-1/+1
|
* [Feature #16254] Use `Primitive.func` styleNobuyoshi Nakada2020-06-199-58/+58
|
* [Feature #16254] Allow `Primitive.func` styleNobuyoshi Nakada2020-06-192-3/+17
|
* [Feature #16254] Use `__builtin.func` styleNobuyoshi Nakada2020-06-199-58/+58
|
* [Feature #16254] Allow `__builtin.func` styleNobuyoshi Nakada2020-06-192-10/+38
|
* Build configured extension libraries onlyNobuyoshi Nakada2020-06-192-2/+12
| | | | | Consider the libraries, which remain exts.mk but not listed in ext/configure-ext.mk, removed.
* Configure only directories having extconf.rbNobuyoshi Nakada2020-06-191-0/+1
|
* Now bundled gems are extracted under .bundle/gemsNobuyoshi Nakada2020-06-192-2/+2
|
* Clean exts.mk under each extension libraryNobuyoshi Nakada2020-06-191-0/+1
|
* test/ruby/test_refinement.rb: suppress warning yb $VEROBSE = nilYusuke Endoh2020-06-191-0/+3
| | | | | | | | http://rubyci.s3.amazonaws.com/ubuntu2004/ruby-master/log/20200619T003004Z.log.html.gz ``` /home/chkbuild/chkbuild/tmp/build/20200619T003004Z/ruby/test/ruby/test_refinement.rb:2428: warning: method redefined; discarding old foo /home/chkbuild/chkbuild/tmp/build/20200619T003004Z/ruby/test/ruby/test_refinement.rb:2418: warning: previous definition of foo was here ```
* Revert accidentally style-formatHiroshi SHIBATA2020-06-191-1/+1
|
* Added sdbm entry to NEWSHiroshi SHIBATA2020-06-191-0/+4
|
* Removed sdbm entries from docHiroshi SHIBATA2020-06-193-8/+1
|
* Removed sdbm entries from toolchaninsHiroshi SHIBATA2020-06-196-13/+0
|
* Removed sdbm and it testsHiroshi SHIBATA2020-06-197-3006/+0
|
* [open3] only close streams if a block is passedJean Boussier2020-06-182-4/+17
| | | | | | | | | | | | Ref: 5429deb075beb9a2b67adae269bbac16325876d1 The previous change totally borke `popen2e` in this usage: ```ruby require 'open3' stdin, stdout, process = Open3.popen2e("cat") puts stdout.read ```
* Add links [ci skip]Kazuhiro NISHIYAMA2020-06-191-0/+5
|
* test/webrick/test_httpresponse.rb: Use a longer indicator for crackYusuke Endoh2020-06-191-13/+13
| | | | | | | | | | | | | | | "hack" was too short. The tests checks the error html, which includes hostname. GitHub Actions hostname seems randomly generated, and it may include the indicator string. https://github.com/ruby/ruby/runs/784896235 ``` 1) Failure: WEBrick::TestHTTPResponse#test_prevent_response_splitting_cookie_headers_cr [/home/runner/work/ruby/ruby/src/test/webrick/test_httpresponse.rb:71]: Expected /hack/ to not match "HTTP/1.1 500 Internal Server Error\r\nContent-Type: text/html; charset=ISO-8859-1\r\n\r\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<HTML>\n <HEAD><TITLE>Internal Server Error</TITLE></HEAD>\n <BODY>\n <H1>Internal Server Error</H1>\n WEBrick::HTTPResponse::InvalidHeader\n <HR>\n <ADDRESS>\n WEBrick/1.6.0 (Ruby/2.8.0/2020-06-18) at\n fv-az89.dddawhu1s14uzpjkiz5fhackre.cx.internal.cloudapp.net:80\n </ADDRESS>\n </BODY>\n</HTML>\n". ``` This change uses longer indicator "cracked_indicator_for_test" instead.
* Update NEWS.md [ci skip]Jeremy Evans2020-06-181-5/+29
|
* Allow refining a frozen classJeremy Evans2020-06-182-1/+36
| | | | | | | | Doing so modifies the class's method table, but not in a way that should be detectable from Ruby, so it may be safe to avoid checking if the class is frozen. Fixes [Bug #11669]
* Raise RuntimeError for class variable overtaken in nonverbose modeJeremy Evans2020-06-183-8/+13
| | | | | | | | | | | | | | | | | | 900e83b50115afda3f79712310e4cb95e4508972 changed from a warning to an error in this case, but the warning was only issued in verbose mode, and therefore the error was only raised in verbose mode. That was not intentional, verbose mode should only change whether warnings are emitted, not other behavior. This issues the RuntimeError in all cases. This change broke a couple tests, as the tests actually issued the warning and therefore now raise an error. This wasn't caught earlier as test_variable suppressed the warning in this case, effectively setting $VERBOSE = false around the code that warned. basictest isn't run in verbose mode and therefore didn't expose the issue previously. Fix these tests. Fixes [Bug #14541]
* Dup splat array in certain cases where there is a block argumentJeremy Evans2020-06-183-10/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes: ```ruby args = [1, 2, -> {}]; foo(*args, &args.pop) ``` call `foo` with 1, 2, and the lambda, in addition to passing the lambda as a block. This is different from the previous behavior, which passed the lambda as a block but not as a regular argument, which goes against the expected left-to-right evaluation order. This is how Ruby already compiled arguments if using leading arguments, trailing arguments, or keywords in the same call. This works by disabling the optimization that skipped duplicating the array during the splat (splatarray instruction argument switches from false to true). In the above example, the splat call duplicates the array. I've tested and cases where a local variable or symbol are used do not duplicate the array, so I don't expect this to decrease the performance of most Ruby programs. However, programs such as: ```ruby foo(*args, &bar) ``` could see a decrease in performance, if `bar` is a method call and not a local variable. This is not a perfect solution, there are ways to get around this: ```ruby args = Struct.new(:a).new([:x, :y]) def args.to_a; a; end def args.to_proc; a.pop; ->{}; end foo(*args, &args) # calls foo with 1 argument (:x) # not 2 arguments (:x and :y) ``` A perfect solution would require completely disabling the optimization. Fixes [Bug #16504] Fixes [Bug #16500]