<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/spec/ruby/language/send_spec.rb, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Update to ruby/spec@3affe1e</title>
<updated>2022-04-25T12:53:54+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2022-04-25T12:53:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=45cf4f218728a15eb36d14a6c9912086525f5e3f'/>
<id>45cf4f218728a15eb36d14a6c9912086525f5e3f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>2.8 -&gt; 3.0 in specs</title>
<updated>2020-09-15T19:56:00+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2020-09-15T19:54:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1af0319fc88688bc5dd5e49eecdb8b534ead9991'/>
<id>1af0319fc88688bc5dd5e49eecdb8b534ead9991</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Dup splat array in certain cases where there is a block argument</title>
<updated>2020-06-18T15:19:33+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2020-05-28T21:59:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=aae8223c7076483f1f1641181088790b2f3a66dd'/>
<id>aae8223c7076483f1f1641181088790b2f3a66dd</id>
<content type='text'>
This makes:

```ruby
  args = [1, 2, -&gt; {}]; foo(*args, &amp;args.pop)
```

call `foo` with 1, 2, and the lambda, in addition to passing the
lambda as a block.  This is different from the previous behavior,
which passed the lambda as a block but not as a regular argument,
which goes against the expected left-to-right evaluation order.

This is how Ruby already compiled arguments if using leading
arguments, trailing arguments, or keywords in the same call.

This works by disabling the optimization that skipped duplicating
the array during the splat (splatarray instruction argument
switches from false to true).  In the above example, the splat
call duplicates the array.  I've tested and cases where a
local variable or symbol are used do not duplicate the array,
so I don't expect this to decrease the performance of most Ruby
programs.  However, programs such as:

```ruby
  foo(*args, &amp;bar)
```

could see a decrease in performance, if `bar` is a method call
and not a local variable.

This is not a perfect solution, there are ways to get around
this:

```ruby
  args = Struct.new(:a).new([:x, :y])
  def args.to_a; a; end
  def args.to_proc; a.pop; -&gt;{}; end
  foo(*args, &amp;args)
  # calls foo with 1 argument (:x)
  # not 2 arguments (:x and :y)
```

A perfect solution would require completely disabling the
optimization.

Fixes [Bug #16504]
Fixes [Bug #16500]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes:

```ruby
  args = [1, 2, -&gt; {}]; foo(*args, &amp;args.pop)
```

call `foo` with 1, 2, and the lambda, in addition to passing the
lambda as a block.  This is different from the previous behavior,
which passed the lambda as a block but not as a regular argument,
which goes against the expected left-to-right evaluation order.

This is how Ruby already compiled arguments if using leading
arguments, trailing arguments, or keywords in the same call.

This works by disabling the optimization that skipped duplicating
the array during the splat (splatarray instruction argument
switches from false to true).  In the above example, the splat
call duplicates the array.  I've tested and cases where a
local variable or symbol are used do not duplicate the array,
so I don't expect this to decrease the performance of most Ruby
programs.  However, programs such as:

```ruby
  foo(*args, &amp;bar)
```

could see a decrease in performance, if `bar` is a method call
and not a local variable.

This is not a perfect solution, there are ways to get around
this:

```ruby
  args = Struct.new(:a).new([:x, :y])
  def args.to_a; a; end
  def args.to_proc; a.pop; -&gt;{}; end
  foo(*args, &amp;args)
  # calls foo with 1 argument (:x)
  # not 2 arguments (:x and :y)
```

A perfect solution would require completely disabling the
optimization.

Fixes [Bug #16504]
Fixes [Bug #16500]
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@519df35</title>
<updated>2019-09-29T14:03:58+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2019-09-29T14:03:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1c938a72aa9378f982dbc55327e86150c47b8707'/>
<id>1c938a72aa9378f982dbc55327e86150c47b8707</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow calling a private accessor with `self.`</title>
<updated>2019-09-19T17:21:37+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2019-09-19T17:17:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e6378cdcd8246697be652b74442f9c07503e0ba6'/>
<id>e6378cdcd8246697be652b74442f9c07503e0ba6</id>
<content type='text'>
[Feature #11297] [Feature #16123]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Feature #11297] [Feature #16123]
</pre>
</div>
</content>
</entry>
<entry>
<title>Added version guard</title>
<updated>2019-09-19T17:21:25+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2019-09-19T17:16:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d583df525922ca14ecfab7a39f0c617eb86bc804'/>
<id>d583df525922ca14ecfab7a39f0c617eb86bc804</id>
<content type='text'>
[Feature #11297] [Feature #16123]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Feature #11297] [Feature #16123]
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow calling a private method with `self.`</title>
<updated>2019-09-19T17:20:59+00:00</updated>
<author>
<name>Dylan Thacker-Smith</name>
<email>Dylan.Smith@shopify.com</email>
</author>
<published>2019-07-02T14:06:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7fbd2f7cc247ee66e877ab3c88f0274834c6b6c7'/>
<id>7fbd2f7cc247ee66e877ab3c88f0274834c6b6c7</id>
<content type='text'>
This makes it consistent with calling private attribute assignment
methods, which currently is allowed (e.g. `self.value =`).

Calling a private method in this way can be useful when trying to
assign the return value to a local variable with the same name.

[Feature #11297] [Feature #16123]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes it consistent with calling private attribute assignment
methods, which currently is allowed (e.g. `self.value =`).

Calling a private method in this way can be useful when trying to
assign the return value to a local variable with the same name.

[Feature #11297] [Feature #16123]
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@875a09e</title>
<updated>2019-07-27T10:40:09+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2019-07-27T10:40:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0'/>
<id>5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@6cf8ebe</title>
<updated>2019-02-07T16:35:33+00:00</updated>
<author>
<name>eregon</name>
<email>eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2019-02-07T16:35:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=75334db3c6479ea3cd7462d36ca5464d386f9c72'/>
<id>75334db3c6479ea3cd7462d36ca5464d386f9c72</id>
<content type='text'>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@4bb0f25</title>
<updated>2018-06-13T21:58:54+00:00</updated>
<author>
<name>eregon</name>
<email>eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2018-06-13T21:58:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b46da8d84efeb97cb52ba0560d5b149ccda0d561'/>
<id>b46da8d84efeb97cb52ba0560d5b149ccda0d561</id>
<content type='text'>
* Specs added by TruffleRuby.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Specs added by TruffleRuby.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
</feed>
