[#108552] [Ruby master Bug#18782] Race conditions in autoload when loading the same feature with multiple threads. — "ioquatix (Samuel Williams)" <noreply@...>
Issue #18782 has been reported by ioquatix (Samuel Williams).
11 messages
2022/05/14
[ruby-core:108660] [Ruby master Bug#18799] Refinement#import_methods vs attr_reader
From:
"palkan (Vladimir Dementyev)" <noreply@...>
Date:
2022-05-24 01:56:54 UTC
List:
ruby-core #108660
Issue #18799 has been reported by palkan (Vladimir Dementyev).
----------------------------------------
Bug #18799: Refinement#import_methods vs attr_reader
https://bugs.ruby-lang.org/issues/18799
* Author: palkan (Vladimir Dementyev)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-darwin21]
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
Currently, it's not possible to import methods defined as attr_{reader, accessor,writer}:
```ruby
module M
attr_reader :fuu
end
module R
refine Object do
import_methods M
end
end
#=> Can't import method which is not defined with Ruby code: M#fuu (ArgumentError)
```
Is that a known/intentional limitation or a bug? From the error message it might seem that this is a bug (since `attr_smth` is a Ruby code).
--
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>