summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-07-19revert r59359, r59356, r59355, r59354normal
These caused numerous CI failures I haven't been able to reproduce [ruby-core:82102] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-18Copy openssl library finder for ext/digest from OpenSSL extention.hsbt
* ext/digest/digest_conf.rb: Support to search variaous filenames of OpenSSL/LibreSSL libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-18fix typonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-18descriptive asssertionsnobu
* test/ruby/test_string.rb (test_uplus_minus): prefer more descriptive asssertions than assert_equal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-18string: preserve taint flag with String#-@ (uminus)normal
* string.c (tainted_fstr_update): move up (rb_fstring): support registering tainted strings (register_fstring_tainted): extract from rb_fstring_existing0 (rb_tainted_fstring_existing): use register_fstring_tainted instead git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-18vm_eval.c: rb_lambda_callnobu
* enum.c (enum_collect): make the block arity same as the given block. [Bug #13391] * internal.h (vm_ifunc): store arity instead of unused id. * proc.c (rb_vm_block_min_max_arity): return ifunc arity. * vm_eval.c (rb_lambda_call): call method with lambda block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-18proc.c: rb_block_min_max_aritynobu
* proc.c (rb_block_min_max_arity): new function to get arity range from the current block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-18test/ruby/test_string.rb: ensure we do not have tainted stringsnormal
Trying to figure out [ruby-core:82092] cf. https://gist.github.com/e2c899c453f3f66e7934095c32505486 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-18newhash insn reuses existing keysnormal
This gives the newhash VM instruction the same string reuse capabilities as rb_hash_aset. * st.c (str_key): new wrapper function to call rb_fstring_existing (rb_hash_bulk_insert): use str_key * test/ruby/test_optimization.rb (test_hash_reuse_fstring): ensure key reuse for newhash instructions git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-18hash: keep fstrings of tainted strings for string keysnormal
The same hash keys may be loaded from tainted data sources frequently (e.g. parsing headers from socket or loading YAML data from a file). If a non-tainted fstring already exists (because the application expects the hash key), cache and deduplicate the tainted version in the new tainted_frozen_strings table. For non-embedded strings, this also allows sharing with the underlying malloc-ed data. * vm_core.h (rb_vm_struct): add tainted_frozen_strings * vm.c (ruby_vm_destruct): free tainted_frozen_strings (Init_vm_objects): initialize tainted_frozen_strings (rb_vm_tfstring_table): accessor for tainted_frozen_strings * internal.h: declare rb_fstring_existing, rb_vm_tfstring_table * hash.c (fstring_existing_str): remove (moved to string.c) (hash_aset_str): use rb_fstring_existing * string.c (rb_fstring_existing): new, based on fstring_existing_str (tainted_fstr_update): new (rb_fstring_existing0): new, based on fstring_existing_str (rb_tainted_fstring_existing): new, special case for tainted strings (rb_str_free): delete from tainted_frozen_strings table * test/ruby/test_optimization.rb (test_hash_reuse_fstring): new test [ruby-core:82012] [Bug #13737] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-18doc/extension.rdoc: start documenting threading and IO APIsnormal
This will hopefully be useful for folks writing C extensions. * doc/extension.rdoc: start documenting threading and IO APIs [ruby-core:82016] [Feature #13740] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-18* 2017-07-18svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-18webrick: fix SNI supportnormal
* lib/webrick/https.rb: check ssl context of virtual host. * lib/webrick/ssl.rb: ensure to return ssl context. * test/webrick/test_https.rb: test returned cert is correct. [Feature #13729][ruby-dev:50173] Author: Tietew <tietew@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-17gmake.mk: extract after update gemsnobu
* defs/gmake.mk (extract-gems): should wait for update-gems to finish when doing both. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-17parse.y: refine literal error messagesnobu
* parse.y (parser_yyerror): strip newline in error source which will not be printed, when lex_p has passed it. * parse.y (parser_tokadd_utf8): unterminated Unicode escape even after invalid Unicode escape. * parse.y (parser_parse_string): show the error source line when unterminated literal at end of file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-16parse.y: refine invalid Unicode escape messagenobu
* parse.y (literal_flush): rename from numeric_literal_flush, as it is not just for numerics now. * parse.y (parser_tokadd_codepoint): show invalid character position, but not the start of Unicode escape. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-16* 2017-07-17svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-16assertions.rb: frozen string buffernobu
* test/lib/test/unit/assertions.rb (assert_pattern_list): make frozen string literals modifiable as buffers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-16parse.y (numeric_literal_flush): fix typonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-16parse.y: utf-8 codepointsnobu
* parse.y (parser_tokadd_utf8): skip spaces in the current line, without advancing the line, to get rid of dangling pointer. [ruby-core:82029] [Bug #13742] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-16* 2017-07-16svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-16Use assert_syntax_errornobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-15parse.y: refine error messagesnobu
* parse.y (parser_read_escape, parser_tok_hex): refine error messages. point from the backslash up to the invalid char. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-15test_lexer.rb: require ripper directlyyui-knk
* test/ripper/test_lexer.rb: This file does not use DummyParser, so requiring ripper directly instead of requiring dummyparser. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-15* 2017-07-15svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-15Fix warning: shadowing outer local variable - akazu
[ci skip][Fix GH-1628] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-14zlib.c: fix unnormalized Fixnumnobu
* ext/zlib/zlib.c (rb_gzfile_total_out): cast to long not to result in an unsigned long to normalized to Fixnum on LLP64 platforms. [ruby-core:81488] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-14io.c: textmode if newline decoratornobu
* io.c (validate_enc_binmode): newline decorator implies text mode now. [ruby-core:80270] [Bug #13350] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-14VPATH for rippernobu
* common.mk (ripper.c): pass the build directory path for id.h which may be generated there. * ext/ripper/depend (ripper.y): search the top build directory and the top source directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-14hash.c: fix possible crash in Hash#transform_keys!rhe
Fix up r59328. It is possible that the given block abuses ObjectSpace.each_object to shrink the temporary array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-14Zlib::GzipReader#pos underflows after calling #ungetbyte or #ungetc at start ↵naruse
of file [Bug #13616] patched by Andrew Haines <andrew@haines.org.nz> [ruby-core:81488] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-14Alias Set#to_s to #inspect [ruby-core:81753] [Feature #13676]knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-14Make tests for Set#inspect more straightforwardknu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-14Update gemspec for standalone gem that is ruby/date repository.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-14Fixup r59327. Forgot to update version number.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-14hash.c: Add Hash#transform_keys and Hash#transform_keys!mrkn
* hash.c (transform_keys_i, rb_hash_transform_keys): Add Hash#transform_keys. [Feature #13583] [ruby-core:81290] * hash.c (rb_hash_transform_keys_bang): Add Hash#transform_keys!. [Feature #13583] [ruby-core:81290] * test/ruby/test_hash.rb: Add tests for above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-14Merge psych-3.0.0.beta3 from ruby/psych.hsbt
* Rely on encoding tags to determine if string should be dumped as binary. https://github.com/ruby/psych/commit/8949a47b8cee31e03e21608406ba116adcf74054 * Specify "frozen_string_literal: true". * Support to binary release for mingw32 platform. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-14Added psych entry to package table and fixed sync instructions.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-14process.c: null bytesnobu
* process.c (rlimit_type_by_sym): prohibit null bytes in key names. [ruby-core:82033] [Bug #13744] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-13Use tr! instead of gsub!kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-13* 2017-07-14svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-13process.c: handle dynamic :rlimit_* symbols in spawn execoptsnormal
* process.c (rb_execarg_addopt_rlimit): hoist out of rb_execarg_addopt (rlimit_type_by_sym): new wrapper for dynamic symbol (rb_execarg_addopt): check for dsym via rlimit_type_by_sym * test/ruby/test_process.rb (test_execopts_rlimit): check dsym w/o pindown Add extra check for bogus rlimit args, too. [ruby-core:82033] [Bug #13744] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-13Use Test::Unit::TestCase instead of MiniTest::Unit::TestCase. Becausehsbt
tests of fiddle already used customized assertions of ruby core. * test/fiddle/helper.rb: Use Test::Unit::TestCase for base class of testcase. * test/fiddle/test_*.rb: Use assert_raise instead of assert_raises. Remove needless includes for Test::Unit::Assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-13parse.y: flush debug outputnobu
* parse.y (parser_compile_error): flush debug output before compile error message, to keep the order. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-12doc/extension.rdoc: update wikipedia link to HTTPSnormal
Avoid the latency for HTTP -> HTTPS redirect * doc/extension.rdoc: update wikipedia link to HTTPS git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-12* 2017-07-13svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-12Fix indent [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-12disable r59314 on mswinnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-12gc.c: restrict RGENGC_DEBUGnobu
* gc.c (RGENGC_DEBUG_ENABLED): restrict runtime ruby_rgengc_debug level up to -RGENGC_DEBUG, to reduce runtime branches in inner loops. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-12* 2017-07-12svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e