summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-09-14ripper: add states of scannernobu
* parse.y (ripper_state): add states of scanner to tokens from Ripper.lex and Ripper::Filter#on_*. based on the patch by aycabta (Code Ahss) at [ruby-core:81789]. [Feature #13686] * ext/ripper/tools/preproc.rb (prelude, usercode): generate EXPR_* constants from enums. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14parse.y: [DOC] fix call-seq [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14ext/coverage/coverage.c: use long instead of int for coverage site idmame
Coverage generates unique ID numbers for each branch and each method. Use long instead of int for the IDs. I don't want to see 2^32 branches and methods in one file, but just in case... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14fix the case High Sierra's mincore(2) may return -128 [Bug #13895]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14compile.c: iseq_pop_newarraynobu
* compile.c (iseq_pop_newarray): optimize array literal in condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14ext/coverage/coverage.c (method_coverage): `id` was used uninitializedmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14Measure branch and method coverage for `make test-all`mame
To measure coverage of C code: `./configure --enable-gcov && make && make exam && make lcov` To measure coverage of Ruby code: `./configure && make && make exam COVERAGE=true && make lcov` To measure coverage of both languages at a time: `./configure --enable-gcov && make && make exam COVERAGE=true && make lcov` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14Introduce NODE_UNLESS for branch coveragemame
`unless` statement was a syntactic sugar for `if` statement, which made the result of branch coverage hard to understand. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14Add method coveragemame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14added workaround for APFS file format.hsbt
* TestFileExhaustive#test_atime: It fails with nano-sec precise. I changed to use unixtime for this assertion for APFS. * TestFileExhaustive#test_expand_path: skip assertion when given invalid charactor on APFS. [Bug #13816][ruby-core:82383] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14Fix the lineno of case statement that has no expressionmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14Add branch coverage for case-when statementmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14Removed needless operator.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14Add branch coverage for while and until statementsmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14Add branch coverage for if statementmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14ext/coverage/coverage.c: Fix the condition for non-experimental modemame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14[EXPERIMENTAL] Extend the API of `Coverage.start` and `result`mame
The old API: Coverage.start load "foo.rb" p Coverage.result #=> {"foo.rb" => [1, 2, nil]} The new API: ENV["COVERAGE_EXPERIMENTAL_MODE"] = "true" Coverage.start(lines: true) load "foo.rb" p Coverage.result #=> {"foo.rb" => {:lines => [1, 2, nil]}} This new API allows us to add other measuring target types. Notes: * To keep compatibility, the old interface is still remained; passing no optional argument makes `Coverage.result` return the old format. * This feature is still experimental. So, to enable the new API, the environment variable `COVERAGE_EXPERIMENTAL_MODE` must be set. I plan to activate this feature by Ruby 2.5. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14Update gemspec for gem released versions.hsbt
* These are dbm, fcntl, io-console, sdbm, stringio, strscan, zlib, cmath, scanf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14remove an unused variable (sometimes it fails test).ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14Add a new instruction `trace2` for hooking with custom datamame
This is needed for passing to the hook function the measuring target type (line/branch/method) and the site of coverage event fired. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-13test_rubyoptions.rb: keep paths if necessarynobu
* test/ruby/test_rubyoptions.rb (TestRubyOptions#test_search): PATH must keep library loading paths on a platform where it is used for that purpose, for extra libraries. [ruby-core:81178] [Bug #13569] [Fix GH-1616] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-13* 2017-09-14svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-13LIBPATHENV on Windowsnobu
* configure.in, win32/Makefile.sub: set LIBPATHENV to PATH on Windows, for extra DLLs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-13test/win32ole/test_word.rb: word quit without confirmation dialog to save suke
files. [Bug #13894] Thanks to h.shirosaki. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-13Random.urandom raises RuntimeError instead of returning nilkazu
[ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-13Removed needless magic-comment for encodings.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-13Fixup r59856. Added workaround for JRuby.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-13Added executable to bundler template.hsbt
It's same as upstream permission. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-13Fix a typo.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12Use mutable strings for mutation tests.ko1
* test/fiddle/test_func.rb (test_string): this test break String buffer by `strcpy` ("000" -> "123"). However, the string literal "000" with `frozen_string_literal: true` returns a string object from frozen string pool. So that after this test "000" from fstring pool becomes "123" (modified string). 'test/date/' uses "000" (as fstring) and tests are fails (we could check with `make test-all TESTS='fiddle date'`). * test/fiddle/test_function.rb: ditto. * test/fiddle/test_import.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12* 2017-09-13svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12cont.c: update comment to match r59776 [ci skip]normal
* cont.c (fiber_switch): th->fiber => th->ec.fiber in comment git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12Random.urandom raises an exception instead of returning nil when failedmame
Early failure looks better in this case. Refs [Bugs #13885]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12openssl: merge test fixes from upstream, part 2rhe
This is a combined patch of the following two commits in maint: a09d8c78dd30 test/test_ssl: suppress warning in test_alpn_protocol_selection_cancel de965374ee85 test/test_pair: disable compression This hopefully fixes the RubyCI gentoo failure: http://rubyci.s3.amazonaws.com/gentoo/ruby-trunk/log/20170912T033004Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12Partly reverted r59845.hsbt
All of environments on Ruby CI are fails rdoc generation. It may be caused by https://github.com/ruby/rdoc/commit/8cfa11d6f1cc7e74e45e42fd8d1d76c5a0646a6e git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12output some strings without quotesnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12Merge fiddle-1.0.0.beta2 from upstream.hsbt
* ext/fiddle/closure.c: use directly declaration for standalone gem without internal.h. * Specify frozen string literal is true. * Update gemspec configuration for release version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12Add *.gemspec to .editorconfig [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12Sort properties in .editorconfig [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12Fix problem when open in emacs [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12Fixed copy option for bundler synchsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12Merge csv-0.1.0 from upstream.hsbt
* csv.gemspec: Update release version. * lib/csv.rb: Remove superfluous private clause. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12Fixed install error with rdoc.gemspechsbt
"lib/rdoc" is only workds on rdoc repository structure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12Merge rdoc-6.0.0.beta2 from upstream.hsbt
* This version changed lexer used Ripper from lexer based IRB. see details: https://github.com/ruby/rdoc/pull/512 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-11console.c: set winsize on Windowsnobu
* ext/io/console/console.c (console_set_winsize): retry shrinking window and screen buffer. [ruby-core:82741] [Bug #13888] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-11* 2017-09-12svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-11test_io_console.rb: test_set_winsize_consolenobu
* test/io/console/test_io_console.rb (test_set_winsize_console): split from test_get_winsize_console and enable the case when attached to a console already git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-11lib/securerandom.rb: test one byte to determine urandom or opensslmame
`SecureRandom#gen_random` determines whether urandom is available or not by trying `Random.urandom(n)`. But, when n = 0, `Random.urandom(0)` always succeeds even if urandom is not available, which leads to a wrong decision. When failed, `Random.urandom` returns nil instead of returning a shorter string than required. So the check for `ret.length != n` is not needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e