summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-04-26Remove test of removed reverse VM instructionKazuhiro NISHIYAMA
since 5512353d97250e85c13bf10b9b32e750478cf474
2021-04-26* 2021-04-26 [ci skip]git
2021-04-26Fix some typos by spell checkerRyuta Kamizono
Notes: Merged: https://github.com/ruby/ruby/pull/4414
2021-04-25[Doc] Fix a typo s/algorthm/algorithm/wonda-tea-coffee
Notes: Merged: https://github.com/ruby/ruby/pull/4412
2021-04-25[ci skip] Fix a typo s/certificiate/certificate/wonda-tea-coffee
Notes: Merged: https://github.com/ruby/ruby/pull/4413
2021-04-25[Doc] Fix a typo s/daguten/dakuten/wonda-tea-coffee
Notes: Merged: https://github.com/ruby/ruby/pull/4411
2021-04-25[Doc] Fix a typo s/arround/around/wonda-tea-coffee
Notes: Merged: https://github.com/ruby/ruby/pull/4410
2021-04-25[Doc] Fix a typo s/visilibity/visibility/wonda-tea-coffee
Notes: Merged: https://github.com/ruby/ruby/pull/4406
2021-04-25[Doc] Fix a typo s/oher/other/wonda-tea-coffee
Notes: Merged: https://github.com/ruby/ruby/pull/4407
2021-04-25[Doc] Fix a typo s/evel/eval/wonda-tea-coffee
Notes: Merged: https://github.com/ruby/ruby/pull/4408
2021-04-25* 2021-04-25 [ci skip]git
2021-04-25[Doc] Fix a typo s/invokations/invocations/wonda-tea-coffee
Notes: Merged: https://github.com/ruby/ruby/pull/4409
2021-04-23Add back checks for empty kw splat with tests (#4405)Alan Wu
This reverts commit a224ce8150f2bc687cf79eb415c931d87a4cd247. Turns out the checks are needed to handle splatting an array with an empty ruby2 keywords hash. Notes: Merged-By: XrXr
2021-04-23Remove part of comment that is no longer accurateJeremy Evans
In Ruby 2.7, empty keyword splats could be added back for backwards compatibility. However, that stopped in Ruby 3.0.
2021-04-23Remove unnecessary checks for empty kw splatAlan Wu
These two checks are surrounded by an if that ensures the call site is not a kw splat call site. Notes: Merged: https://github.com/ruby/ruby/pull/4404 Merged-By: XrXr
2021-04-23Fix setting method visibility for a refinement without an origin classJeremy Evans
If a class has been refined but does not have an origin class, there is a single method entry marked with VM_METHOD_TYPE_REFINED, but it contains the original method entry. If the original method entry is present, we shouldn't skip the method when searching even when skipping refined methods. Fixes [Bug #17519] Notes: Merged: https://github.com/ruby/ruby/pull/4357
2021-04-24* 2021-04-24 [ci skip]git
2021-04-23Fix wrong documentationromainsalles
It doesn't return `nil` but raises an exception, as explained a few lines after Notes: Merged: https://github.com/ruby/ruby/pull/4403
2021-04-23test/ruby/test_assignment.rb: Avoid "assigned but unused variable"Yusuke Endoh
2021-04-23Remove unneeded commentS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/4402
2021-04-23* 2021-04-23 [ci skip]git
2021-04-23Suppress warnings for unsued variableHiroshi SHIBATA
2021-04-22Update bundled_gemsKazuhiro NISHIYAMA
2021-04-22[ruby/uri] Use Regexp#match? to avoid extra allocationsSteven Harman
`#=~` builds `MatchData`, requiring extra allocations as compared to `#match?`, which returns a boolean w/o having to build the `MatchData`. https://github.com/ruby/uri/commit/158f58a9cc
2021-04-22[ruby/uri] remove comment about URI::escape as it is removedFelix Wong
https://github.com/ruby/uri/commit/0f0057e1b2
2021-04-22[ruby/uri] Set required_ruby_version to 2.4 in gemspecJeremy Evans
Tests pass on Ruby 2.4, but not on Ruby 2.3. https://github.com/ruby/uri/commit/594418079a
2021-04-22[ruby/uri] Only use UnboundMethod#bind_call if it is availableJeremy Evans
This allows tests to pass on Ruby 2.4-2.6. Fixes #19 https://github.com/ruby/uri/commit/67ca99ca87
2021-04-22[ruby/uri] Add tests for URI::RFC{2396,3986}_Parser#inspectJeremy Evans
https://github.com/ruby/uri/commit/d47dae2f8e
2021-04-22[ruby/uri] Optimize URI#hostname and URI#hostname=Lukas Zapletal
https://github.com/ruby/uri/commit/3b7ccfd835
2021-04-22[ruby/uri] Upstream Java proxy property checks from JRubyCharles Oliver Nutter
These Java properties, retrieved from JRuby's "Java env" ENV_JAVA, allow JRuby users to use the same proxy properties the rest of the Java platform uses. This resolves https://bugs.ruby-lang.org/issues/11194 https://github.com/ruby/uri/commit/3bd2bcc95a
2021-04-22[ruby/net-imap] Bump version to 0.2.1Shugo Maeda
https://github.com/ruby/net-imap/commit/31f96ea884
2021-04-22[ruby/net-imap] Set timeout for IDLE responsesShugo Maeda
Fixes #14 https://github.com/ruby/net-imap/commit/39d39ff9bb
2021-04-22Merge net-imap-0.2.0Hiroshi SHIBATA
2021-04-22Separate test used by test_ractor for Ractor in test_time.rbHiroshi SHIBATA
2021-04-22[ruby/io-console] Move FFI console under libCharles Oliver Nutter
Having the separate dir makes testing difficult and doesn't reflect the structure the gem will eventually have. We can filter these files out if necessary when building the CRuby gem. https://github.com/ruby/io-console/commit/881010447c
2021-04-22[ruby/io-console] Enable building the C extension on TruffleRuby.Duncan MacGregor
https://github.com/ruby/io-console/commit/c17b8cf3a9
2021-04-22Ignore JRuby files on io-consoleHiroshi SHIBATA
2021-04-22[ruby/benchmark] gemspec: Explicitly have 0 executablesOlle Jonsson
This gem exposes no executables. https://github.com/ruby/benchmark/commit/ff1ef7ae06
2021-04-22[ruby/benchmark] Add comment about terminating newline in captions; fix test ↵Keith Bennett
method name. https://github.com/ruby/benchmark/commit/02ce298d3e
2021-04-22[ruby/cgi] gemspec: Explicitly empty executables listOlle Jonsson
The gem exposes no executables https://github.com/ruby/cgi/commit/cd7106ad97
2021-04-22[ruby/cgi] Add test for escapeHTML/unescapeHTML invalid encoding fix in pure ↵Jeremy Evans
ruby version Also, remove pointless assert_nothing_raised(ArgumentError) while here. https://github.com/ruby/cgi/commit/c05edf5608
2021-04-22[ruby/cgi] handle invalid encodingpavel
https://github.com/ruby/cgi/commit/2b1c2e21a4
2021-04-22[ruby/time] Make Time friendly to RactorKir Shatrov
https://github.com/ruby/time/commit/c784e4f166
2021-04-22fix raise in exception with jumpKoichi Sasada
add_ensure_iseq() adds ensure block to the end of jump such as next/redo/return. However, if the rescue cause are in the body, this rescue catches the exception in ensure clause. iter do next rescue R ensure raise end In this case, R should not be executed, but executed without this patch. Fixes [Bug #13930] Fixes [Bug #16618] A part of tests are written by @jeremyevans https://github.com/ruby/ruby/pull/4291 Notes: Merged: https://github.com/ruby/ruby/pull/4399
2021-04-21Remove reverse VM instructionJeremy Evans
This was previously only used by the multiple assignment code, but is no longer needed after the multiple assignment execution order fix. Notes: Merged: https://github.com/ruby/ruby/pull/4398
2021-04-22* 2021-04-22 [ci skip]git
2021-04-21Evaluate multiple assignment left hand side before right hand sideJeremy Evans
In regular assignment, Ruby evaluates the left hand side before the right hand side. For example: ```ruby foo[0] = bar ``` Calls `foo`, then `bar`, then `[]=` on the result of `foo`. Previously, multiple assignment didn't work this way. If you did: ```ruby abc.def, foo[0] = bar, baz ``` Ruby would previously call `bar`, then `baz`, then `abc`, then `def=` on the result of `abc`, then `foo`, then `[]=` on the result of `foo`. This change makes multiple assignment similar to single assignment, changing the evaluation order of the above multiple assignment code to calling `abc`, then `foo`, then `bar`, then `baz`, then `def=` on the result of `abc`, then `[]=` on the result of `foo`. Implementing this is challenging with the stack-based virtual machine. We need to keep track of all of the left hand side attribute setter receivers and setter arguments, and then keep track of the stack level while handling the assignment processing, so we can issue the appropriate topn instructions to get the receiver. Here's an example of how the multiple assignment is executed, showing the stack and instructions: ``` self # putself abc # send abc, self # putself abc, foo # send abc, foo, 0 # putobject 0 abc, foo, 0, [bar, baz] # evaluate RHS abc, foo, 0, [bar, baz], baz, bar # expandarray abc, foo, 0, [bar, baz], baz, bar, abc # topn 5 abc, foo, 0, [bar, baz], baz, abc, bar # swap abc, foo, 0, [bar, baz], baz, def= # send abc, foo, 0, [bar, baz], baz # pop abc, foo, 0, [bar, baz], baz, foo # topn 3 abc, foo, 0, [bar, baz], baz, foo, 0 # topn 3 abc, foo, 0, [bar, baz], baz, foo, 0, baz # topn 2 abc, foo, 0, [bar, baz], baz, []= # send abc, foo, 0, [bar, baz], baz # pop abc, foo, 0, [bar, baz] # pop [bar, baz], foo, 0, [bar, baz] # setn 3 [bar, baz], foo, 0 # pop [bar, baz], foo # pop [bar, baz] # pop ``` As multiple assignment must deal with splats, post args, and any level of nesting, it gets quite a bit more complex than this in non-trivial cases. To handle this, struct masgn_state is added to keep track of the overall state of the mass assignment, which stores a linked list of struct masgn_attrasgn, one for each assigned attribute. This adds a new optimization that replaces a topn 1/pop instruction combination with a single swap instruction for multiple assignment to non-aref attributes. This new approach isn't compatible with one of the optimizations previously used, in the case where the multiple assignment return value was not needed, there was no lhs splat, and one of the left hand side used an attribute setter. This removes that optimization. Removing the optimization allowed for removing the POP_ELEMENT and adjust_stack functions. This adds a benchmark to measure how much slower multiple assignment is with the correct evaluation order. This benchmark shows: * 4-9% decrease for attribute sets * 14-23% decrease for array member sets * Basically same speed for local variable sets Importantly, it shows no significant difference between the popped (where return value of the multiple assignment is not needed) and !popped (where return value of the multiple assignment is needed) cases for attribute and array member sets. This indicates the previous optimization, which was dropped in the evaluation order fix and only affected the popped case, is not important to performance. Fixes [Bug #4443] Notes: Merged: https://github.com/ruby/ruby/pull/4390 Merged-By: jeremyevans <code@jeremyevans.net>
2021-04-21[ruby/pp] Bump version to 0.2.0Hiroshi SHIBATA
https://github.com/ruby/pp/commit/a202dd2c9b
2021-04-21[ruby/pp] Support < Ruby 3.0Hiroshi SHIBATA
https://github.com/ruby/pp/commit/3ee131ae92
2021-04-21[ruby/resolv] gemspec: Explicitly list 0 executablesOlle Jonsson
This gem exposes no executables, and this makes that clearer. https://github.com/ruby/resolv/commit/8797a9d3ce