aboutsummaryrefslogtreecommitdiffstats
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
...
* kill "value computed is not used" warningkosaki2017-10-211-3/+3
| | | | | | | | | | | Currently, gcc claims your coding style is not good. Shut it up. ../../../ext/psych/yaml/emitter.c: In function ‘yaml_emitter_write_plain_scalar’: ../../../ext/psych/yaml/emitter.c:28:6: warning: value computed is not used [-Wunused-value] && ((emitter->line_break == YAML_CR_BREAK ? \ ^ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* kill variable set but not used warningkosaki2017-10-211-8/+4
| | | | | | | | | | | Currently, dummy_mark variable makes following warnings. Let's fix it. ../../../ext/psych/yaml/parser.c: In function ‘yaml_parser_parse_block_sequence_entry’: ../../../ext/psych/yaml/parser.c:762:21: warning: variable ‘dummy_mark’ set but not used [-Wunused-but-set-variable] yaml_mark_t dummy_mark; /* Used to eliminate a compiler warning. */ ^ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* kill "variable set but not used" warningkosaki2017-10-211-3/+1
| | | | | | | | | | Currently, scanner.c makes following warning. Fix it. ../../../ext/psych/yaml/scanner.c: In function ‘yaml_parser_decrease_flow_level’: ../../../ext/psych/yaml/scanner.c:1189:23: warning: variable ‘dummy_key’ set but not used [-Wunused-but-set-variable] yaml_simple_key_t dummy_key; /* Used to eliminate a compiler warning. */ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add example for Socket.gethostbyaddr.akr2017-10-211-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Treat REG_NONE just like REG_BINARYusa2017-10-211-3/+3
| | | | | | | | | * ext/win32/lib/win32/registry.rb (read, write): treat REG_NONE just like REG_BINARY when reading and writing. cf. [Bug #7526] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* imemo_mask (enum) -> IMEMO_MASK (immediate value).ko12017-10-211-1/+1
| | | | | | | | * internal.h: imemo_mask is not a valid imemo type but switch statements show warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* declare variables once for each line in pathname.c.akr2017-10-211-15/+68
| | | | | | | | This ease adding/deleting variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Replace NODE_ALLOCA with T_IMEMO (imemo_alloc)mame2017-10-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Pathname#glob method implemented.akr2017-10-211-2/+53
| | | | | | | [ruby-core:49373] [Feature #7360] proposed by Alexander E. Fischer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Replace `to_a[1..-1]` on a MatchData with `captures`knu2017-10-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove redundant calls of String#chrknu2017-10-211-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lexer.rb: no dedent strings in middlenobu2017-10-191-1/+1
| | | | | | | | * ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): dedent only strings at the beginning, not strings in middle. [ruby-core:83343] [Bug #14027] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* socket.c: null byte at Socket.getnameinfonobu2017-10-111-2/+2
| | | | | | | | * ext/socket/socket.c (sock_s_getnameinfo): check null byte. patched by tommy (Masahiro Tomita) in [ruby-dev:50286]. [Bug #13994] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* zlib.c: ensure to freenobu2017-10-071-21/+36
| | | | | | | | * ext/zlib/zlib.c (zlib_gunzip): gz0 is a structure variable on the stack, no longer valid after exit by an exception. ensure to free instead. [Bug #13982] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* zlib.c: memory leak in gunzipnobu2017-10-061-4/+21
| | | | | | | * ext/zlib/zlib.c (zlib_gunzip): clear zstream to fix memory leak. [ruby-core:83162] [Bug #13982] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dbm.c: suppress unused-but-set-variable warningnobu2017-09-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gdbm.c: use the default external encodingnobu2017-09-301-7/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dbm.c: removed useless assignmentsnobu2017-09-301-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext: check if null byte is containednobu2017-09-307-22/+25
| | | | | | [ruby-dev:50267] [Bug #13953] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ripper/lexer.rb: remove double quotesnobu2017-09-301-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.acnobu2017-09-291-2/+2
| | | | | | | | | | | * 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
* pty.c: shrink repeated device namesnobu2017-09-271-40/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* objspace_dump.c: remove unnecessary breaknobu2017-09-271-14/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext: adjust indent [ci skip]nobu2017-09-276-59/+59
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: import e72d960db262rhe2017-09-246-40/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync with master branch of ruby/openssl.git to import changes in v2.1.0.beta1..v2.0.6. The commit log since v2.1.0.beta1 which was imported by r59734 can be found at: https://github.com/ruby/openssl/compare/v2.1.0.beta1...e72d960db262 ---------------------------------------------------------------- Kazuki Yamaguchi (16): test/test_pair: fix test_write_nonblock{,_no_exceptions} x509name: fix a typo in docs test/test_fips: skip if setting FIPS mode fails test/test_asn1: fix possible failure in test_utctime test/test_ssl: suppress warning in test_alpn_protocol_selection_cancel test/test_pair: disable compression test/test_ssl: skip tmp_ecdh_callback test for LibreSSL >= 2.6.1 test/test_ssl: do not run NPN tests for LibreSSL >= 2.6.1 tool/ruby-openssl-docker: update test/test_pair: replace sleep with IO.select ssl: prevent SSLSocket#sysread* from leaking uninitialized data ossl.c: use struct CRYPTO_dynlock_value for non-dynamic locks ossl.c: make legacy locking callbacks reentrant test/test_engine: suppress stderr test/test_engine: check if RC4 is supported Ruby/OpenSSL 2.0.6 SHIBATA Hiroshi (1): To use upstream url of github nobu (1): ruby.h: unnormalized Fixnum value git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* load.c: fix rb_load_protect conditionnobu2017-09-242-0/+20
| | | | | | | * load.c (rb_load_protect): fix the condition to load the found file. fixup of r59155. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Added sections of pysch library to LEGAL.hsbt2017-09-231-19/+0
| | | | | | | * ext/psych/yaml/LICENSE: Integrate libyaml license to LEGAL and removed this file from repository. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix up r59949nobu2017-09-201-0/+2
| | | | | | | * ext/ripper/lib/ripper/lexer.rb (List#inspect): splat self data to local variables same as members of Elem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fixup r59961. Use http for libffi downloading.hsbt2017-09-191-1/+1
| | | | | | | | A few environments couldn't handle https download. * https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20170919T032511Z.fail.html.gz * https://rubyci.org/logs/www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20170919T040500Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use https instead of ftp for libffi downloading.hsbt2017-09-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: ripper_lex_state_namenobu2017-09-181-0/+27
| | | | | | | | | | * parse.y (ripper_lex_state_name): represent lex_state as OR-ed form. * ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer::Elem#to_a): lex_state for inspection. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/objspace/objspace.c: remove unneeded code clones.mame2017-09-171-22/+1
| | | | | | `setup_hash` have already performed nil check and empty check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/io/console/lib/console/size.rb: Fix the context of method definitionmame2017-09-171-1/+1
| | | | | | `console_size` is not a instance method but a class method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/date/extconf.rb: check for timezone and altzonerhe2017-09-172-2/+7
| | | | | | | | Instead of in configure.in. As of r28592 the HAVE_VAR_TIMEZONE and HAVE_VAR_ALTZONE macros are only used by ext/date. ext/date doesn't care whether they are int or long, so just check for the existence. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* To use github url for gemspec.hsbt2017-09-155-5/+5
| | | | | | [Bug #13906][ruby-core:82817] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/coverage/coverage.c (rb_coverage_start): Ensure `opt` is a hashyui-knk2017-09-151-0/+2
| | | | | | | | Ensure `opt` is a hash before using `rb_hash_lookup` to `opt`. This will prevent SEGV when an inappropriate object (i.e. an array) is passed to `opt`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ripper: add states of scannernobu2017-09-143-20/+43
| | | | | | | | | | | * 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
* ext/coverage/coverage.c: use long instead of int for coverage site idmame2017-09-141-5/+7
| | | | | | | | 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
* ext/coverage/coverage.c (method_coverage): `id` was used uninitializedmame2017-09-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add method coveragemame2017-09-141-1/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Removed needless operator.hsbt2017-09-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add branch coverage for if statementmame2017-09-141-1/+26
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/coverage/coverage.c: Fix the condition for non-experimental modemame2017-09-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [EXPERIMENTAL] Extend the API of `Coverage.start` and `result`mame2017-09-141-8/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update gemspec for gem released versions.hsbt2017-09-147-35/+61
| | | | | | | * 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
* Merge fiddle-1.0.0.beta2 from upstream.hsbt2017-09-1213-19/+19
| | | | | | | | | * 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
* console.c: set winsize on Windowsnobu2017-09-111-9/+14
| | | | | | | * 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
* sprintf.c: NULL as strnobu2017-09-091-0/+8
| | | | | | | * sprintf.c (ruby_vsnprintf, ruby_snprintf): allow NULL as str, just count the expected buffer size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: unnormalized Fixnum valuenobu2017-09-073-3/+3
| | | | | | | * include/ruby/ruby.h (ST2FIX): fix unnormalized Fixnum value bug on mingw/mswin. [ruby-core:82687] [Bug #13877] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Improve line covearge of ext/io/nonblock/nonblock.c from 54.5% to 95.5%mame2017-09-041-1/+1
| | | | | | Not so good test, but it would be better than nothing, I guess... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e