<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/delegate.rb, branch v3_0_4</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Update library versions of the default gems.</title>
<updated>2020-12-22T12:45:28+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2020-12-22T12:43:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9b9cbbbc17bb5840581c7da37fd0feb0a7d4c1f3'/>
<id>9b9cbbbc17bb5840581c7da37fd0feb0a7d4c1f3</id>
<content type='text'>
  They are followed up with
  https://github.com/ruby/ruby/commit/8fb02b7a97317090e3946e6f2d4a7d034f9699f1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  They are followed up with
  https://github.com/ruby/ruby/commit/8fb02b7a97317090e3946e6f2d4a7d034f9699f1
</pre>
</div>
</content>
</entry>
<entry>
<title>Extract version number from the source</title>
<updated>2020-07-30T10:03:18+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2020-07-28T15:31:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b2d96abb42abbe2e01f010ffc9ac51f0f9a50002'/>
<id>b2d96abb42abbe2e01f010ffc9ac51f0f9a50002</id>
<content type='text'>
"requiring version.rb" strategy has some issues.

- cannot work when cross-compiling
- often introduces wrong namespace
- must know the superclasses
- costs at each runtime than at build-time

etc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"requiring version.rb" strategy has some issues.

- cannot work when cross-compiling
- often introduces wrong namespace
- must know the superclasses
- costs at each runtime than at build-time

etc.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add instance_methods to class generated by DelegateClass</title>
<updated>2020-07-09T22:01:10+00:00</updated>
<author>
<name>Masataka Pocke Kuwabara</name>
<email>kuwabara@pocke.me</email>
</author>
<published>2020-07-09T22:01:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ba81bc24e62d03cc0f4c05cf4e2b378696631568'/>
<id>ba81bc24e62d03cc0f4c05cf4e2b378696631568</id>
<content type='text'>
Also, make DelegateClass.instance_method fallback to superclass.

Fixes [Bug #16982]</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also, make DelegateClass.instance_method fallback to superclass.

Fixes [Bug #16982]</pre>
</div>
</content>
</entry>
<entry>
<title>Add require to Delegator examples</title>
<updated>2020-06-25T15:21:13+00:00</updated>
<author>
<name>Richard Schneeman</name>
<email>richard.schneeman+foo@gmail.com</email>
</author>
<published>2020-06-25T14:34:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2d89af45ea8b3f521102c05694f419ecd8254e69'/>
<id>2d89af45ea8b3f521102c05694f419ecd8254e69</id>
<content type='text'>
In Ruby 2.7.1 SimpeDelegator cannot be used without requiring `delegate` this PR adds the require to the first example for each class so that devs don't have to hunt for what require to use.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In Ruby 2.7.1 SimpeDelegator cannot be used without requiring `delegate` this PR adds the require to the first example for each class so that devs don't have to hunt for what require to use.</pre>
</div>
</content>
</entry>
<entry>
<title>Support obj.clone(freeze: true) for freezing clone</title>
<updated>2020-03-22T16:30:07+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2019-09-23T23:03:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4f7b435c955792af780fe9e94f98d3dde839e056'/>
<id>4f7b435c955792af780fe9e94f98d3dde839e056</id>
<content type='text'>
This freezes the clone even if the receiver is not frozen.  It
is only for consistency with freeze: false not freezing the clone
even if the receiver is frozen.

Because Object#clone is now partially implemented in Ruby and
not fully implemented in C, freeze: nil must be supported to
provide the default behavior of only freezing the clone if the
receiver is frozen.

This requires modifying delegate and set, to set freeze: nil
instead of freeze: true as the keyword parameter for
initialize_clone.  Those are the two libraries in stdlib that
override initialize_clone.

Implements [Feature #16175]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This freezes the clone even if the receiver is not frozen.  It
is only for consistency with freeze: false not freezing the clone
even if the receiver is frozen.

Because Object#clone is now partially implemented in Ruby and
not fully implemented in C, freeze: nil must be supported to
provide the default behavior of only freezing the clone if the
receiver is frozen.

This requires modifying delegate and set, to set freeze: nil
instead of freeze: true as the keyword parameter for
initialize_clone.  Those are the two libraries in stdlib that
override initialize_clone.

Implements [Feature #16175]
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix SimpleDelegator respond_to? regression</title>
<updated>2020-02-03T16:16:22+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2020-02-03T11:29:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f2552216d43040cd42bbb9fd484eab6c70856fe6'/>
<id>f2552216d43040cd42bbb9fd484eab6c70856fe6</id>
<content type='text'>
In 2.6, SimpleDelegator would always use the target `respond_to?`

In 2.7.0 it doesn't if the target does not inherit from Object.

This breaks compatibility for delegated objects that inherit
from BasicObject and redefine `respond_to?`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In 2.6, SimpleDelegator would always use the target `respond_to?`

In 2.7.0 it doesn't if the target does not inherit from Object.

This breaks compatibility for delegated objects that inherit
from BasicObject and redefine `respond_to?`.
</pre>
</div>
</content>
</entry>
<entry>
<title>delegate.rb: fixed keyword arguments in DelegateClass</title>
<updated>2020-01-30T13:13:29+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2020-01-21T02:47:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9bcf4f3db26249772c983896ebbc9ff41f4614db'/>
<id>9bcf4f3db26249772c983896ebbc9ff41f4614db</id>
<content type='text'>
`Delegator.delegating_block` should delegate keyword arguments
separately.  [ruby-core:96949]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`Delegator.delegating_block` should delegate keyword arguments
separately.  [ruby-core:96949]
</pre>
</div>
</content>
</entry>
<entry>
<title>Call initialize_clone with freeze: false if clone called with freeze: false</title>
<updated>2020-01-04T04:13:09+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2019-08-26T04:11:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=04eb7c7e462d1fcbab9efc7022c1b43636ab878a'/>
<id>04eb7c7e462d1fcbab9efc7022c1b43636ab878a</id>
<content type='text'>
This makes it possible to initialize_clone to correctly not freeze
internal state if the freeze: false keyword is passed to clone.

If clone is called with freeze: true or no keyword, do not pass
a second argument to initialize_clone to keep backwards
compatibility.

This makes it so that external libraries that override
initialize_clone but do not support the freeze keyword will fail
with ArgumentError if passing freeze: false to clone.  I think that
is better than the current behavior, which succeeds but results in
an unfrozen object with frozen internals.

Fix related issues in set and delegate in stdlib.

Fixes [Bug #14266]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes it possible to initialize_clone to correctly not freeze
internal state if the freeze: false keyword is passed to clone.

If clone is called with freeze: true or no keyword, do not pass
a second argument to initialize_clone to keep backwards
compatibility.

This makes it so that external libraries that override
initialize_clone but do not support the freeze keyword will fail
with ArgumentError if passing freeze: false to clone.  I think that
is better than the current behavior, which succeeds but results in
an unfrozen object with frozen internals.

Fix related issues in set and delegate in stdlib.

Fixes [Bug #14266]
</pre>
</div>
</content>
</entry>
<entry>
<title>Deprecate taint/trust and related methods, and make the methods no-ops</title>
<updated>2019-11-17T23:00:25+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2019-09-25T03:59:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ffd0820ab317542f8780aac475da590a4bdbc7a8'/>
<id>ffd0820ab317542f8780aac475da590a4bdbc7a8</id>
<content type='text'>
This removes the related tests, and puts the related specs behind
version guards.  This affects all code in lib, including some
libraries that may want to support older versions of Ruby.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes the related tests, and puts the related specs behind
version guards.  This affects all code in lib, including some
libraries that may want to support older versions of Ruby.
</pre>
</div>
</content>
</entry>
<entry>
<title>Support delegates for BasicObject</title>
<updated>2019-10-10T20:15:00+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2019-08-25T07:04:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2322c94dd65c0247b103e2f91411e37458e1466d'/>
<id>2322c94dd65c0247b103e2f91411e37458e1466d</id>
<content type='text'>
For BasicObject, bind the Kernel respond_to? instance method to the
object and call it instead of calling the method directly.

Also, use bind_call(recv, ...) for better performance.

Fixes [Bug #16127]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For BasicObject, bind the Kernel respond_to? instance method to the
object and call it instead of calling the method directly.

Also, use bind_call(recv, ...) for better performance.

Fixes [Bug #16127]
</pre>
</div>
</content>
</entry>
</feed>
