summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-09-09Make test-all and test-spec runnable on AndroidYusuke Endoh
Calling some syscall functions such as Dir.chroot causes SIGSYS instead of EPERM on Android. This change skips all tests that stops the test-suite run.
2019-09-09Fix a typo [ci skip]Kazuhiro NISHIYAMA
2019-09-09Reline: Fix wrong variable nameLars Kanis
This raised a NameError before. Notes: Merged: https://github.com/ruby/ruby/pull/2438
2019-09-09Fix expected ip_portMasaki Matsushita
2019-09-09Fix service name for testMasaki Matsushita
change service name to fix failed test on Solaris
2019-09-09Fix domain name for testMasaki Matsushita
2019-09-08Fix invalid keyword argument separation warning for delegating callsJeremy Evans
This removes an invalid keyword argument separation warning for code such as: ```ruby def foo(arg) arg end kw = {} foo(*[1], **kw) ``` This warning was caused because the remove_empty_keyword_hash was set based on a comparison with two variables, and in this case, one of the variables was updated after the check and we need to use the updated variable. Simplify things by just inlining the comparison.
2019-09-09Support timeout for AddrinfoMasaki Matsushita
Addrinfo.getaddrinfo and .foreach now accepts :timeout in seconds as a keyword argument. If getaddrinfo_a(3) is available, the timeout will be applied for name resolution. Otherwise, it will be ignored. Socket.tcp accepts :resolv_timeout to use this feature.
2019-09-08Add keyword argument separation tests for implicit/explicit super callsJeremy Evans
No code changes are necessary, but we didn't have as extensive tests for these calls previously.
2019-09-09* 2019-09-09 [ci skip]git
2019-09-09Use target-specific variable instead of a conditional [ci skip]Nobuyoshi Nakada
And test-rubyspec is deprecated.
2019-09-08make-snapshot: -git option is no longer provided [ci skip]Nobuyoshi Nakada
2019-09-08Improve Proc#to_s specsBenoit Daloze
2019-09-08Removed useless braces to suppress a warningNobuyoshi Nakada
2019-09-08Behave ESC key correctly when vi command modeaycabta
2019-09-08compile.c (compile_hash): rewrite keyword splat handlingYusuke Endoh
and add some comments. (I confirm that `foo(**{})` allocates no hash object.)
2019-09-08compile.c (compile_hash): rewrite the compilation algorithmYusuke Endoh
This is a similar refactoring to 8c908c989077c74eed26e02912b98362e509b8a3, but the target is compile_hash.
2019-09-08Remove .document and .gitignore from file list of rdoc.gemspecaycabta
2019-09-08compile.c (NODE_OP_ASGN1): Remove unneeded DECL_ANCHORYusuke Endoh
2019-09-08make-snapshot: default to the toplevel directoryNobuyoshi Nakada
As this tool has been intended to use in a working directory, assume that the toplevel directory is under the VCS, and SVN will no longer be canonical.
2019-09-08parse.y: Use the correct alias for brace flag of hash literalYusuke Endoh
nd_alen and nd_brace is the same field, but nd_brace is more suitable for this case.
2019-09-08compile.c (keyword_node_p): Refactor out keyword node checksYusuke Endoh
2019-09-08compile.c (compile_hash): Remove redundant check for NODE_ZLISTYusuke Endoh
NODE_ZLIST case is handled in compile_hash, so iseq_compile_each0 doesn't have to do the same check redundantly.
2019-09-08compile.c (compile_hash): Simplify the keyword handlingYusuke Endoh
The length of NODE_LIST chain in NODE_HASH is always even because it represents key-value pairs. There is no need to check for the odd-length case.
2019-09-08compile.c (compile_hash): don't add a temporal array to mark_aryYusuke Endoh
The array is just for a temporal buffer to create a hash, not stored in the final iseq.
2019-09-08compile.c (compile_array): undef a temporal macroYusuke Endoh
2019-09-08* 2019-09-08 [ci skip]git
2019-09-08Touch copied cache files to make tarballs stableNobuyoshi Nakada
2019-09-08Suppress detached head warningNobuyoshi Nakada
2019-09-07Avoid defining DISPATCH_ARCH_DEPEND_WAY macroTakashi Kokubun
when it's not used. This macro is not used when it's direct threaded code. This patch is purely for readability and has no impact for any behavior.
2019-09-07* remove trailing spaces. [ci skip]git
2019-09-07compile.c (compile_array): rewrite the compilation algorithmYusuke Endoh
The original code looks unnecessarily complicated (to me). Also, it creates a pre-allocated array only for the prefix of the array. The new code optimizes not only the prefix but also the subsequence that is longer than 0x40 elements. # not optimized 10000000.times { [1+1, 1,2,3,4,...,63] } # 2.12 sec. # (1+1; push 1; push 2; ...; puts 63; newarray 64; concatarray) # optimized 10000000.times { [1+1, 1,2,3,4,...,63,64] } # 1.46 sec. # (1+1; newarray 1; putobject [1,2,3,...,64]; concatarray)
2019-09-07compile.c (compile_hash): refactoringYusuke Endoh
The same refactoring as to b601b13c7267889bf394146353c5f2b0eb488278.
2019-09-07compile.c (compile_array): refactoringYusuke Endoh
"popped" case can be so simple, so this change moves the branch to the first, instead of scattering `if (popped)` branches to the main part. Also, the return value "len" is not used. So it returns just 0 or 1.
2019-09-07armv7l and armv7l are the same platform, generalize to armv7Benoit Daloze
[Bug #16007]
2019-09-07Exit gently if no VCS found but --suppress_not_found is givenNobuyoshi Nakada
2019-09-07Removed no longer used variableNobuyoshi Nakada
2019-09-07compile.c: Separate compile_list to two functions for Array and HashYusuke Endoh
compile_list was for the compilation of Array literal and Hash literal. I guess it was originally reasonable to handle them in one function, but now, compilation of Array is very different from Hash. So the function was complicated by many branches for Array and Hash. This change separates the function to two ones for Array and Hash.
2019-09-07compile.c (compile_list): allow an odd-length hidden array literalYusuke Endoh
An array literal [1,2,...,301] was compiled to the following iseq: duparray [1,2,...,300] putobject [301] concatarray The Array literal optimization took every two elements maybe because it must handle not only Array but also Hash. Now the optimization takes each element if it is an Array literal. So the new iseq is: duparray [1,2,...,301].
2019-09-07compile.c (compile_list): emit newarraykwsplat only at the last chunkYusuke Endoh
`[{}, {}, {}, ..., {}, *{}]` is wrongly created. A big array literal is created and concatenated for every 256 elements. The newarraykwsplat must be emitted only at the last chunk.
2019-09-07Check github.repository in doxygen.yml [ci skip]Kazuhiro NISHIYAMA
2019-09-07Rename some function/definition names that handles NODE_LISTYusuke Endoh
from array to list. Follow up to ac50ac03aeb210763730cdc45f230e236519223d
2019-09-07Rename NODE_ARRAY to NODE_LIST to reflect its actual use casesYusuke Endoh
and NODE_ZARRAY to NODE_ZLIST. NODE_ARRAY is used not only by an Array literal, but also the contents of Hash literals, method call arguments, dynamic string literals, etc. In addition, the structure of NODE_ARRAY is a linked list, not an array. This is very confusing, so I believe `NODE_LIST` is a better name.
2019-09-07[DOC] Update output of Ripper.sexp [ci skip]Kazuhiro NISHIYAMA
2019-09-07Fixed wrong usage of file2lastrev.rbNobuyoshi Nakada
2019-09-07Assign to vcs in new_vcs block not to use rescue resultNobuyoshi Nakada
2019-09-07Fixed wrong method at 71f7b0421acNobuyoshi Nakada
2019-09-06Fix keyword argument warnings in the tests from Class#newJeremy Evans
This were previously hidden because calls from C were not warned. Notes: Merged: https://github.com/ruby/ruby/pull/2432
2019-09-06Fix Tempfile.open to correctly pass keywords to Tempfile.newJeremy Evans
Notes: Merged: https://github.com/ruby/ruby/pull/2432
2019-09-06Enable keyword argument warnings when called from CJeremy Evans
Previously, Ruby did not warn in these cases, and in some cases did not have the same behavior. This makes calls from C handled the same way as calls from Ruby. Notes: Merged: https://github.com/ruby/ruby/pull/2432