aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* symbol.c: rb_sym_internnobu2015-11-303-5/+53
| | | | | | | * symbol.c (rb_sym_intern): rename from rb_cstr_intern and add variants. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-11-30svn2015-11-291-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c: remove spurious #define for globalsnormal2015-11-292-74/+58
| | | | | | | | | | Removing the indirection helps me with readability, at least. It doesn't seem like there are many other places in the Ruby code where macros are used like this. [ruby-core:71735] [Feature #11749] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* SIGTERM should be also capturednaruse2015-11-291-1/+1
| | | | | | | because it will terminate the whole test process when it is re-raised from this assertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* version.c: remove ruby_engine_namenobu2015-11-294-7/+8
| | | | | | | | | | | | | * ruby.c (load_file_internal, ruby_process_options): share ruby_engine instead of literal strings. * version.c (Init_version): remove internal `ruby_engine_name`, but set the VM program name in addition to the global constant. * vm_backtrace.c (location_to_str, oldbt_init): use th eVM program name always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-11-29svn2015-11-291-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Corrected grammar errors [ci skip]nobu2015-11-292-11/+16
| | | | | | | * NEWS: [DOC] Various grammar corrections and clarifications to increase readability. [Fix GH-1115] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: last content of heredocnobu2015-11-283-0/+14
| | | | | | | * parse.y (parser_here_document): store dispatched result of on_tstring_content at the last fragment of a here document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ripper/lexer.rb: dispatch aliasnobu2015-11-281-5/+5
| | | | | | | * ext/ripper/lib/ripper/lexer.rb: alias same methods instead of eval for each events. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ripper/core.rb: share handlersnobu2015-11-281-35/+21
| | | | | | | | * ext/ripper/lib/ripper/sexp.rb (SexpBuilderPP): share scanner event handlers and most of parser event handlers with SexpBuilder. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ripper/core.rb: dispatch aliasnobu2015-11-281-10/+11
| | | | | | | * ext/ripper/lib/ripper/core.rb: alias same methods instead of eval for each events. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-11-28svn2015-11-271-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fixup! * lib/net/http.rb (connect): detect closed connection and reconnect ↵naruse2015-11-271-1/+1
| | | | | | If the server closes a keep-alive http connection, the client socket reaches EOF. To avoid an EOFError, detect the closed connection and reconnect. Added test to ensure HTTP#post succeeds even if the keep-alive-connection has been closed by the server. by Kristian Hanekamp <kris.hanekamp@gmail.com> https://github.com/ruby/ruby/pull/1089 fix GH-1089 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_parser_events.rb: suppress a warningnobu2015-11-271-1/+1
| | | | | | | | * test/ripper/test_parser_events.rb (test_warn_cr_in_middle): remove unused variable to suppress assigned-but-unused-variable warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (connect): detect closed connection and reconnectnaruse2015-11-273-4/+38
| | | | | | | | | | | | If the server closes a keep-alive http connection, the client socket reaches EOF. To avoid an EOFError, detect the closed connection and reconnect. Added test to ensure HTTP#post succeeds even if the keep-alive-connection has been closed by the server. by Kristian Hanekamp <kris.hanekamp@gmail.com> https://github.com/ruby/ruby/pull/1089 fix GH-1089 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: reduce ifdefsnobu2015-11-271-16/+16
| | | | | | | * parse.y (dispatch_ignored_scan_event, has_delayed_token): more macros to reduce ifdefs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-11-27svn2015-11-261-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use more tough server: GitHub or repo.or.cznaruse2015-11-261-1/+5
| | | | | | https://gcc.gnu.org/wiki/GitMirror git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* increase additional nfilesnaruse2015-11-261-1/+1
| | | | | | On recent my environment, it must be more than 11. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: tailcall opt for indexersnobu2015-11-262-3/+12
| | | | | | | | | * compile.c (iseq_peephole_optimize): enable tail call optimization for specialized indexers. * compile.c (iseq_compile_each): blockiseq should be NULL, but not Qnil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* downloader.rb: Downloader.httpsnobu2015-11-261-8/+15
| | | | | | | * tool/downloader.rb (Downloader.https): extract a method instead of a global variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2015-11-261-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regcomp.c, regenc.c, regexec.c, regint.h, enc/unicode.c:naruse2015-11-266-313/+495
| | | | | | | Merge Onigmo 58fa099ed1a34367de67fb3d06dd48d076839692 + https://github.com/k-takata/Onigmo/pull/52 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fixup! r52695naruse2015-11-262-3/+4
| | | | | | | | | | OpenSSL's SHA1 struct name is SHA_CTX (which is also used for SHA-0), but function name is SHA1_Transform. http://openssl.org/docs/man0.9.8/crypto/SHA1.html also note that LibreSSL 2.3 remove the SHA-0 support but still support SHA-1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/coverage/test_coverage.rb: Added test-case for Coverage.restart.hsbt2015-11-262-0/+23
| | | | | | [Misc #11732][ruby-dev:49379] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/coverage/test_coverage.rb: Added test-case for Coverage.peek_resulthsbt2015-11-262-0/+10
| | | | | | without Coverage.start. [Misc #11726][ruby-core:71622] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-11-26svn2015-11-251-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/openssl/test_ssl.rb (test_copy_stream): new testnormal2015-11-252-0/+18
| | | | | | | | | | I was worried r52750 would break IO.copy_stream with things like OpenSSL sockets which wrap IOs, but require data to be run through through encryption/decryption filters. Apparently my worry was unfounded, but perhaps this test will ensure this case continues to work. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: try to_io firstnobu2015-11-253-36/+56
| | | | | | | * io.c (copy_stream_body): try to_io conversion before read, readpartial, and write methods. [ruby-dev:49008] [Bug #11199] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.h: rename membernobu2015-11-255-13/+17
| | | | | | | | | | | * iseq.h (rb_compile_option_struct): rename the member frozen_string_literal_debug as debug_frozen_string_literal. [Feature #11725] * ruby.c (proc_options): do not set $DEBUG and $VERBOSE only if no arguments is given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add NEWS entry about --debug=frozen-string-literalko12015-11-251-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: color to ifchangenobu2015-11-251-1/+4
| | | | | | | * configure.in: pass --color to ifchange from CONFIGURE_TTY for reconfig. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_objectspace.rb: missing tests from rubyspecnobu2015-11-251-0/+24
| | | | | | | | | | * test/ruby/test_objectspace.rb (test_each_object): incorporated from rubyspec. * test/ruby/test_objectspace.rb (test_each_object_enumerator): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (argf_getpartial): should not resize str if the secondshugo2015-11-253-1/+20
| | | | | | | argument is not given. [ruby-core:71668] [Bug #11738] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-11-25svn2015-11-241-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: On Solaris, it is safe to define _LARGEFILE_SOURCEngoto2015-11-242-0/+23
| | | | | | | when _FILE_OFFSET_BITS=64 is defined (= when 32-bit compile). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typo [ci skip]kazu2015-11-241-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: ripper for warningsnobu2015-11-242-63/+30
| | | | | | | * parse.y (parser_yylex): deal with magic comment warnings also in ripper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix dispatch_scan_eventnobu2015-11-241-1/+1
| | | | | | * parse.y (dispatch_scan_event): fix wrong macro at r52547. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rubygems/installer.rb: Fix two double-word typos.hsbt2015-11-242-2/+7
| | | | | | [ci skip][fix GH-1108] Patch by @jwworth git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Drop support for BeOSnobu2015-11-2415-165/+17
| | | | | | | * beos: Drop support for BeOS now that Haiku is stable. [Fix GH-1112] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* internal.h: export rb_gc_for_fdnobu2015-11-242-1/+6
| | | | | | | * internal.h (rb_gc_for_fd): move to export, as referred by ext/socket. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add missing punctuation to File docs [ci skip]nobu2015-11-242-1/+6
| | | | | | | * file.c: [DOC] add a missing period to File docs, to terminate the sentence and separate from the next sentence. [Fix GH-1111] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix Struct#dig issue number [ci skip]nobu2015-11-232-1/+6
| | | | | | | * NEWS: Fix the issue number of `Struct#dig`, which should be [Feature #11688]. [Fix GH-1110] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/socket/init.c (rsock_accept): handle ENOMEMnormal2015-11-232-0/+5
| | | | | | | accept(2) documents ENOMEM as a possible error, handle it consistent with all of our other FD-allocating wrappers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use rb_gc_for_fd for more callersnormal2015-11-236-7/+14
| | | | | | | | | | | | | | | | * dir.c (dir_initialize): use rb_gc_for_fd for ENOMEM * ext/socket/init.c (rsock_socket): ditto * ext/socket/socket.c (rsock_socketpair): ditto * internal.h (rb_gc_for_fd): prototype * io.c (rb_gc_for_fd): remove static [ruby-core:71623] [Feature #11727] Manpages for opendir(2), socket(2), and socketpair(3posix) describe ENOMEM as a possible error for each of these; handle it consistently with our existing wrappers for open(2)/pipe(2) etc... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (rb_gc_for_fd): wrapper for retrying FD creationnormal2015-11-232-11/+27
| | | | | | | | | | | | | | | | | | | | | | | This simplifies callers and makes error handling more consistent between our pipe, open, fdopen, and dup wrappers. This adds missing ENOMEM handling as documented in the open(2), pipe(2freebsd), and fdopen(3posix) manpages on my system. We also avoid repeatedly accessing `errno` which is implemented in TLS on GNU/Linux systems and more expensive to read than a local variable. We may export this in internal.h for ext/socket/* and dir.c, too. * io.c (rb_gc_for_fd): new helper function (ruby_dup): use rb_gc_for_fd (rb_sysopen): ditto (rb_fdopen): ditto (rb_pipe): ditto [ruby-core:71623] [Feature #11727] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-11-24svn2015-11-231-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fiddle: release GVL for ffi_callnormal2015-11-238-36/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some external functions I wish to call may take a long time and unnecessarily block other threads. This may lead to performance regressions for fast functions as releasing/acquiring the GVL is not cheap, but can improve performance for long-running functions in multi-threaded applications. This also means we must reacquire the GVL when calling Ruby-defined callbacks for Fiddle::Closure, meaning we must detect whether the current thread has the GVL by exporting ruby_thread_has_gvl_p in internal.h * ext/fiddle/function.c (struct nogvl_ffi_call_args): new struct for GVL release (nogvl_ffi_call): new function (function_call): adjust for GVL release [ruby-core:71642] [Feature #11607] * ext/fiddle/closure.c (struct callback_args): new struct for GVL acquire (with_gvl_callback): adjusted original callback function (callback): wrapper for conditional GVL acquire * ext/fiddle/depend: add dependencies * ext/fiddle/extconf.rb: include top_srcdir for internal.h * internal.h (ruby_thread_has_gvl_p): expose for fiddle * vm_core.h (ruby_thread_has_gvl_p): moved to internal.h * test/fiddle/test_function.rb (test_nogvl_poll): new test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: On Solaris, with gcc, "-std=iso9899:1999"ngoto2015-11-232-0/+14
| | | | | | | | | in $ansi_options is often also needed in CPPFLAGS, because some feature definitions vary depending on such standards options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e