<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ruby-gems/hashie.git/lib/hashie/utils.rb, branch master</title>
<subtitle>github.com: intridea/hashie
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/hashie.git/'/>
<entry>
<title>Suppress an integer unification warning for Ruby 2.4.0+</title>
<updated>2020-01-16T01:58:05+00:00</updated>
<author>
<name>Koichi ITO</name>
<email>koic.ito@gmail.com</email>
</author>
<published>2020-01-15T04:12:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/hashie.git/commit/?id=4d3d06268068b3832dcf1e384ce6f95f1a759248'/>
<id>4d3d06268068b3832dcf1e384ce6f95f1a759248</id>
<content type='text'>
This PR suppresss the following integer unification warning
for Ruby 2.4.0+

```console
% ruby -v
ruby 2.4.9p362 (2019-10-02 revision 67824) [x86_64-darwin17]
% bundle exec rspec spec/hashie/extensions/deep_merge_spec.rb

Hashie::Extensions::DeepMerge
/Users/koic/src/github.com/hahie/hashie/lib/hashie/utils.rb:38: warning:
constant ::Fixnum is deprecated
/Users/koic/src/github.com/hahie/hashie/lib/hashie/utils.rb:38: warning:
constant ::Bignum is deprecated
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR suppresss the following integer unification warning
for Ruby 2.4.0+

```console
% ruby -v
ruby 2.4.9p362 (2019-10-02 revision 67824) [x86_64-darwin17]
% bundle exec rspec spec/hashie/extensions/deep_merge_spec.rb

Hashie::Extensions::DeepMerge
/Users/koic/src/github.com/hahie/hashie/lib/hashie/utils.rb:38: warning:
constant ::Fixnum is deprecated
/Users/koic/src/github.com/hahie/hashie/lib/hashie/utils.rb:38: warning:
constant ::Bignum is deprecated
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Prevent deep_merge from mutating nested hashes</title>
<updated>2019-11-17T18:09:01+00:00</updated>
<author>
<name>Michael Herold</name>
<email>opensource@michaeljherold.com</email>
</author>
<published>2018-10-01T02:21:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/hashie.git/commit/?id=72d969260fadea6047a29eb00099b8e88f689fb9'/>
<id>72d969260fadea6047a29eb00099b8e88f689fb9</id>
<content type='text'>
The `DeepMerge` extension has two methods of mutating hashes: a
destructive one and a non-destructive one. The `#deep_merge` version
should not mutate the original hash or any hash nested within it. The
`#deep_merge!` version is free to mutate the receiver.

Without deeply duplicating the values contained within the hash, the
invariant of immutability cannot be held for the original hash. In order
to preserve that invariant, we need to introduce a method of deeply
duplicating the hash.

The trick here is that we cannot rely on a simple call to `Object#dup`.
Some classes within the Ruby standard library are not duplicable in
particular versions of Ruby. Newer versions of Ruby allow these classes
to be "duplicated" in a way that returns the original value. These
classes represent value objects, so it is safe to return the original
value ... unless the classes are monkey-patched, but that isn't
something we can protect against.

This implementation does a best-effort to deeply duplicate an entire
hash by relying on these value object classes being able to return
themselves without violating immutability.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `DeepMerge` extension has two methods of mutating hashes: a
destructive one and a non-destructive one. The `#deep_merge` version
should not mutate the original hash or any hash nested within it. The
`#deep_merge!` version is free to mutate the receiver.

Without deeply duplicating the values contained within the hash, the
invariant of immutability cannot be held for the original hash. In order
to preserve that invariant, we need to introduce a method of deeply
duplicating the hash.

The trick here is that we cannot rely on a simple call to `Object#dup`.
Some classes within the Ruby standard library are not duplicable in
particular versions of Ruby. Newer versions of Ruby allow these classes
to be "duplicated" in a way that returns the original value. These
classes represent value objects, so it is safe to return the original
value ... unless the classes are monkey-patched, but that isn't
something we can protect against.

This implementation does a best-effort to deeply duplicate an entire
hash by relying on these value object classes being able to return
themselves without violating immutability.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a logging layer to address common issues (#381)</title>
<updated>2016-11-02T10:47:33+00:00</updated>
<author>
<name>Michael Herold</name>
<email>michael.j.herold+github@gmail.com</email>
</author>
<published>2016-11-02T10:47:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/hashie.git/commit/?id=e35e628dddcc0439948a78189a90d057da7f59fb'/>
<id>e35e628dddcc0439948a78189a90d057da7f59fb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
