aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * 2017-11-03svn2017-11-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rexml: improve docsstomar2017-11-021-2/+1
| | | | | | | * lib/rexml/entity.rb: [DOC] drop a pointless comment. Reported by Michael Gee (mikegee). [Fix GH-1736] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* skip/fix wrong testsnobu2017-11-022-1/+9
| | | | | | | * test/ruby/test_{class,eval}.rb: skip or fix wrong tests hidden by a bug of assert_raise. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: fix return in assert_raisenobu2017-11-022-4/+18
| | | | | | | * test/lib/test/unit/assertions.rb (assert_raise): should fail if returned gently in the given block without any exceptions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: kw splat after splatnobu2017-11-022-0/+8
| | | | | | | * compile.c (setup_args): set keyword splat flag after splat arguments. [ruby-core:83638] [Bug #10856] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* debug.c: vm call flagsnobu2017-11-021-0/+1
| | | | | | * debug.c (ruby_dummy_gdb_enums): include vm_call_flag_bits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bignum.c: avoid use of uninitialized value in Integer.sqrtrhe2017-11-021-0/+1
| | | | | | | | This is a follow-up fix to r57713. estimate_initial_sqrt() didn't initialize BDIGITs except the topmost two, letting Integer.sqrt return wrong result in the fast path, such as for (1<<504). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support Windowsusa2017-11-021-11/+2
| | | | | | | | | | * spec/bundler/spec_helper.rb: there are no reason to refuse ':' and '-' in the path of spec files. especially, ':' is always contained on Windows. * spec/bundler/spec/helper.rb: open3.rb is also supported on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fixed syntax error with ignore option order.hsbt2017-11-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge release version of Rubygems 2.7.0.hsbt2017-11-023-3/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Should quote by double quotes, not single quotes for Windowsusa2017-11-021-1/+1
| | | | | | | * common.mk (test-bundler-precheck): single quotes is not quote on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-11-02svn2017-11-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2017-11-010-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces, append newline at EOF.svn2017-11-01653-327/+327
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update bundled bundler to 1.16.0.hsbt2017-11-011025-3164/+13886
| | | | | | | * lib/bundler, spec/bundler: Merge bundler-1.16.0. * common.mk: rspec examples of bundler-1.16.0 needs require option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: refactored compile_returnnobu2017-11-011-9/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_syntax.rb: all assertionsnobu2017-11-011-6/+7
| | | | | | | * test/ruby/test_syntax.rb (test_return_toplevel): try all assertions even if any assertions failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Pathname: get rid of a -Wcomment warning [DOC]nobu2017-11-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: infect from argumentsnobu2017-11-012-1/+21
| | | | | | | | * file.c (rb_check_realpath_internal): infetct the result with arguments, no taint if none are tainted and cwd is not used. [ruby-core:83583] [Bug #14060] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r60596 because it cause faulure on TestFile#test_realpath_taintednessko12017-11-012-18/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dir.c: cast to suppress a warningnobu2017-11-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: infect from argumentsnobu2017-11-012-1/+18
| | | | | | | | * file.c (rb_check_realpath_internal): infetct the result with arguments, no taint if none are tainted and cwd is not used. [ruby-core:83583] [Bug #14060] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dir: Dir.mkdir and Dir.rmdir release GVLnormal2017-11-011-5/+34
| | | | | | | | | | | | | | This avoids blocking the entire VM when operating on slow or unreliable filesystems. Instead, only the thread performing the mkdir or rmdir operation is blocked and other threads are free to proceed. * dir.c (nogvl_mkdir): new function (nogvl_rmdir): ditto (dir_s_mkdir): release GVL (dir_s_rmdir): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Pathname: Simplify example [DOC] [ci-skip]marcandre2017-10-311-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-11-01svn2017-10-311-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use mode_t where applicable (instead of int)normal2017-10-312-12/+12
| | | | | | | | | | | | | | | | mode_t is the correct type for these syscalls and it can be easier-to-understand. It may also help portability to future platforms and improve type checking. * dir.c (dir_s_mkdir): use mode_t for mkdir(2) * file.c (chmod_internal): use mode_t for chmod(2) (rb_file_s_chmod): s/int/mode_t/ (lchmod_internal): ditto, deref pointer as in chmod_internal (rb_file_s_lchmod): pass pointer as in rb_file_s_chmod (rb_file_s_rename): use mode_t for umask(2) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* node.h: Rename nd_reserved to nd_locationyui-knk2017-10-311-5/+5
| | | | | | | * node.h (RNode): Now nd_reserved is used to store location information, so rename nd_reserved to nd_location. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: ensure after return in library toplevelnobu2017-10-312-19/+21
| | | | | | | | | | * compile.c (compile_return): execute ensure clause after toplevel return even in library toplevel other than the main script. [ruby-core:83589] [Bug #14061] test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: compile_returnnobu2017-10-311-56/+62
| | | | | | * compile.c (compile_return): extract from iseq_compile_each. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* null byte at Psych::Emitter.hsbt2017-10-312-8/+8
| | | | | | | Check null byte. Patched by tommy (Masahiro Tomita). [Bug #13993][ruby-dev:50285] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove unneeded complexitymame2017-10-311-4/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* webrick/httpresponse: minor cleanups to reduce memory usenormal2017-10-311-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | I never knew "format" was a global method alias for "sprintf"; so it was confusing to me. Normally, one would use "sprintf" since it's also available in many other languages, but Integer#to_s avoids parsing a format string so it's less bug-prone. Furthermore, favor string interpolation over String#<< since it is easier for the VM to optimize memory allocation (as in r60320). Interpolation also reduces method calls and memory overhead for inline method cache. Finally, ensure we clear all short-lived buffers for body responses. A similar change was made and measured for Net::* in r58840 showing a large memory reduction on some workloads. * webrick/httpresponse.rb (send_body_io): favor String#to_s, reduce method calls for String#<<, clear `buf' when done, avoid extra String#bytesize calls * (send_body_string): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use NODE_CASE2 if case expressions don't existyui-knk2017-10-315-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When NODE_WHEN is compiled by iseq_compile_each0, the node passed to compile_when is NODE_WHEN (not NODE_CASE). So we can not handle the location of NODE_CASE of case statements which don't have case expressions. e.g. : ``` case; when 1; foo; when 2; bar; else baz; end ``` This commit adds NODE_CASE2, and compiles it by iseq_compile_each0. * compile.c (compile_case): Does not call COMPILE_ when NODE_CASE does not have case expressions. * compile.c (compile_case2): Compile NODE_CASE2 by compile_case2. * compile.c (compile_when): Delete an obsoleted function. * compile.c (iseq_compile_each0): Compile NODE_CASE2. * ext/objspace/objspace.c (count_nodes): Add NODE_CASE2 case. * node.c (dump_node, rb_gc_mark_node): Add NODE_CASE2 case. * node.h (node_type): Add NODE_CASE2. * node.h (NEW_CASE2): Add a macro which generates NODE_CASE2. * parse.y: Generate NODE_CASE2 if case expressions don't exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* webrick: support Proc objects as body responsesnormal2017-10-302-0/+58
| | | | | | | | | | | | * lib/webrick/httpresponse.rb (send_body): call send_body_proc (send_body_proc): new method (class ChunkedWrapper): new class * test/webrick/test_httpresponse.rb (test_send_body_proc): new test (test_send_body_proc_chunked): ditto [Feature #855] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dir: Dir.chdir releases GVLnormal2017-10-301-1/+13
| | | | | | | | | | | | chdir(2) is subject to all the pathological slowdowns and caveats as open(2) on slow or unreliable filesystems, so ensure other threads can proceed while this is happening. * dir.c (nogvl_chdir): new function * dir.c (dir_chdir): release GVL git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-10-31svn2017-10-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use nd_lineno instead of nd_line for branch coveragesyui-knk2017-10-301-13/+17
| | | | | | | | | | | | | | | | | | | | * compile.c (compile_if, compile_case, compile_loop, iseq_compile_each0): Use nd_lineno of nodes for branch coverages. nd_lineno is not adjusted line number of nodes. Sometimes nd_line is adjusted by fixpos. These adjustments lead to confusing result. For example, lineno of NODE_IF is 1, but line is 2 (line number is one-based). ``` ;;;;;;;;;;;;;;;;;;;;if 1 + 1 2 end ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Store lineno on RNodeyui-knk2017-10-303-585/+749
| | | | | | | | | | | | | | | * node.c (A_NODE_HEADER): Print lineno. * node.h (nd_column, nd_set_column): Store column number with 16-bit. * node.h (nd_lineno, nd_set_lineno): Define getter/setter macros for lineno of RNode. * parse.y : Set first lineno of tokens. Thanks to takeshinoda for review. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* backward.h: rb_frame_method_id_and_classnobu2017-10-302-1/+3
| | | | | | | * include/ruby/backward.h (rb_frame_method_id_and_class): moved a deprecated declaration from intern.h, for r60558. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rbinstall.rb: show categories of default gemsnobu2017-10-301-5/+6
| | | | | | | | * tool/rbinstall.rb (#install_default_gem): show categories of default gems, pure ruby libraries and libraries with extensions. [ruby-core:83600] [Bug #14065] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* stop refine_spec because it causes double free errorko12017-10-301-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove duplicated column setyui-knk2017-10-291-1/+0
| | | | | | | * parse.y : Column of resq is set by new_resbody, so this line is needless. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (new_regexp_gen): Set column for NODE_SCOPEyui-knk2017-10-291-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: improve docsstomar2017-10-291-1/+1
| | | | | | * string.c: [DOC] fix rdoc for cross reference; fix grammar. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/set.rb: improve docs for Set#===stomar2017-10-291-6/+11
| | | | | | * lib/set.rb: [DOC] improve description and examples for Set#===. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: improve docsstomar2017-10-291-7/+7
| | | | | | * io.c: [DOC] fix rdoc for some cross references; fix grammar. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: docs for IO#writestomar2017-10-291-2/+2
| | | | | | * io.c: [DOC] fix example and language in IO#write docs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* doc/contributors.rdoc: [DOC] updatestomar2017-10-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: doc fixstomar2017-10-291-2/+2
| | | | | | * complex.c: [DOC] fix grammar and typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Clarify what is written and read in IO#popen speceregon2017-10-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e