[#103241] [Ruby master Bug#17777] 2.6.7 fails to build on macOS: implicit declaration of function 'rb_native_mutex_destroy' is invalid in C99 — eregontp@...
Issue #17777 has been reported by Eregon (Benoit Daloze).
17 messages
2021/04/05
[#103305] [Ruby master Feature#17785] Allow named parameters to be keywords — marcandre-ruby-core@...
Issue #17785 has been reported by marcandre (Marc-Andre Lafortune).
21 messages
2021/04/08
[#103342] [Ruby master Feature#17790] Have a way to clear a String without resetting its capacity — jean.boussier@...
Issue #17790 has been reported by byroot (Jean Boussier).
14 messages
2021/04/09
[#103388] [ANN] Multi-factor Authentication of bugs.ruby-lang.org — SHIBATA Hiroshi <hsbt@...>
Hello,
5 messages
2021/04/12
[#103414] Re: [ANN] Multi-factor Authentication of bugs.ruby-lang.org
— Martin J. Dürst <duerst@...>
2021/04/13
Is there a way to use this multi-factor authentication for (like me)
[#103547] List of CI sites to check — Martin J. Dürst <duerst@...>
Hello everybody,
4 messages
2021/04/22
[#103596] [Ruby master Feature#17830] Add Integer#previous and Integer#prev — rafasoaresms@...
Issue #17830 has been reported by rafasoares (Rafael Soares).
9 messages
2021/04/26
[ruby-core:103189] [Ruby master Feature#17472] HashWithIndifferentAccess like Hash extension
From:
lamont@...
Date:
2021-04-02 19:34:26 UTC
List:
ruby-core #103189
Issue #17472 has been updated by lamont (Lamont Granquist).
Any implementation should probably consider recursive structures under arrays and all the mutator methods on Array:
``` ruby
% pry
[1] pry(main)> require 'active_support/hash_with_indifferent_access'
=> true
[2] pry(main)> test = ActiveSupport::HashWithIndifferentAccess.new
=> {}
[3] pry(main)> test['foo'] = []
=> []
[4] pry(main)> test['foo'] << { bar: "baz" }
=> [{:bar=>"baz"}]
[5] pry(main)> test.class
=> ActiveSupport::HashWithIndifferentAccess
[6] pry(main)> test['foo'][0].class
=> Hash
[7] pry(main)> test['foo'] = [ { bar: "baz" } ]
NoMethodError: undefined method `nested_under_indifferent_access' for {:bar=>"baz"}:Hash
from /Users/lamont/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3.1/lib/active_support/hash_with_indifferent_access.rb:381:in `convert_value'
[8] pry(main)>
```
----------------------------------------
Feature #17472: HashWithIndifferentAccess like Hash extension
https://bugs.ruby-lang.org/issues/17472#change-91264
* Author: naruse (Yui NARUSE)
* Status: Open
* Priority: Normal
* Target version: 3.1
----------------------------------------
Rails has [ActiveSupport::HashWithIndifferentAccess](https://api.rubyonrails.org/classes/ActiveSupport/HashWithIndifferentAccess.html), which is widely used in Rails to handle Request, Session, ActionView's form construction, ActiveRecord's DB communication, and so on. It receives String or Symbol and normalize them to fetch the value. But it is implemented with Ruby. If we provide C implementation of that, Rails will gain the performance improvement.
summary of previous discussion: https://github.com/rails/rails/pull/40182#issuecomment-687607812
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>