summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-07-24* 2017-07-24svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-24optparse.rb: case-sensitive candidatenobu
* lib/optparse.rb (candidate): short options are case-sensitive by the default, should not match case-different options.. https://github.com/mernen/completion-ruby/pull/9#issuecomment-317287946 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-23* 2017-07-23svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-23sprintf.c: width too bignobu
* sprintf.c (rb_str_format): explicitly reject too big negative width, instead of an empty string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-22* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-22Add Doxygen commentsyugui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-22Fix documentskazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-22Fix typos and indentkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-22* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-22Add documentsyugui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-22compile.c: COMPILE_ERRORnobu
* compile.c: raise COMPILE_ERROR instead of compile_bug which is very rarely (or never, actually) useful to debug instruction sequence. COMPILE_ERROR is usually SyntaxError, or fatal error if compile_debug is enabled, git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-21compile.c: dump iseq at adjust bugnobu
* compile.c (fix_sp_depth): dump instructions at adjust bug too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-21* 2017-07-22svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-21NEWS: add entries for thread_sync.c changesnormal
I'm slightly worried about some external code subclassing ConditionVariable, Queue, and SizedQueue and relying on them being Structs. However, they only started being Structs with Ruby 2.1, and were implemented in pure Ruby before that; so hopefully nobody notices that implementation detail. Also, note the Mutex change as it may affect program design when space can be saved. * NEWS: entries for [Feature #13552] and [Feature #13517] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-21strscan.c: fix segfault in arefnobu
* ext/strscan/strscan.c (strscan_aref): fix segfault after get_byte or getch which do not apply regexp. [ruby-core:82116] [Bug #13759] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-21optparse.rb: [DOC] fix keysnobu
* lib/optparse.rb (getopts): [DOC] parameter keys are strings, not symbols. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-21ripper: add kwrest_param parser eventrhe
* parse.y (f_kwrest): Dispatch kwrest_param event. This is especially useful for unnamed kwrest parameter for which we expose the internal ID currently. [ruby-core:75528] [Feature #12387] * test/ripper/dummyparser.rb (on_kwrest_param): Add handler for kwrest_param parser event. * test/ripper/test_parser_events.rb (test_params): Adapt to the change in DummyParser. (test_kwrest_param): Test that kwrest_param event handler is called. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-20Use `unpack1` instead of `unpack` and `[0]`kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-20logger.rb: Fix handling prognamesonots
Because progname was memoized with ||= a logger call that involved outputting false would be nil. Example code: logger = Logger.new(STDOUT) logger.info(false) # => nil Perform an explicit nil check instead of ||= so that false will be output. patched by Gavin Miller <gavingmiller@gmail.com> [Fix GH-1667] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-20NEWS: Add String#delete_suffix and String#delete_suffix!sonots
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-20* 2017-07-21svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-20string.c: add String#delete_suffix and String#delete_suffix!sonots
to remove trailing suffix [Feature #13665] [Fix GH-1661] * string.c (rb_str_delete_suffix_bang): add a new method to remove suffix destuctively. * string.c (rb_str_delete_suffix): add a new method to remove suffix non-destuctively. * test/ruby/test_string.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-20Remove dead codeyugui
* eval.c (errinfo_setter): dead for 10 years since r13091. (rb_rubylevel_errinfo): not used and not exported. usually removed or hidden by linker. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-20parse.y: empty hash in definednobu
* parse.y (command): NODE_ARRAY with NULL is invalid. traversal in defined_expr0 is simplified than iseq_compile_each0. [ruby-core:82113] [Bug #13756] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-20compile.c: restore stack at returnnobu
* compile.c (iseq_compile_each0): restore the stack depth after return to the previous depth, to fix the stack depth at returning from rescue iseq. [ruby-core:82108] [Bug #13755] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-19lib/net/pop.rb: support timeout for TLS handshakeshugo
Patch by ahorek (Pavel Rosický). [ruby-core:80490] [Feature #13389] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-19lib/net/imap.rb: Ignore trailing space for Microsoft Exchange Servershugo
Based on the patch by keysen (Jérémy Carlier). [ruby-core:81641] [Bug #13649] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-19* 2017-07-20svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-19Sort entries [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-19NEWS: Add Hash#transform_keys and Hash#transform_keys!kazu
[Feature #13583] [ruby-core:81290] [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-19random.c: ensure initializednobu
* random.c (get_rnd, try_get_rnd): ensure initialized to get rid of crash in forked processes. [ruby-core:82100] [Bug #13753] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-19test_rand.rb: improved assert_fork_statusnobu
* test/ruby/test_rand.rb (assert_fork_status): deal with errors from children. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-19st.c: adjust stylenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-19* 2017-07-19svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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