fledman (David Feldman)
- Login: fledman
- Registered on: 01/08/2021
- Last sign in: 01/25/2022
Issues
| open | closed | Total | |
|---|---|---|---|
| Assigned issues | 0 | 0 | 0 |
| Reported issues | 0 | 1 | 1 |
Activity
04/05/2021
-
09:52 PM Ruby Bug #17519: set_visibility fails when a prepended module and a refinement both exist
- this fix seems to have introduced a new but similar bug: https://github.com/ruby/ruby/pull/4200#issuecomment-813671308
03/16/2021
-
07:12 PM Ruby Bug #17519: set_visibility fails when a prepended module and a refinement both exist
- do you plan to backport the fix to any of the supported 2.x versions?
01/11/2021
-
07:01 PM Ruby Bug #17519: set_visibility fails when a prepended module and a refinement both exist
- although the title makes it sound obscure, this bug is actually fairly easy to trigger when using rspec and rails:
* activesupport >= 5 prepends a module onto Hash
* i18n >= 1.3 refines several methods on Hash
* power_assert (used b...
01/08/2021
-
07:45 PM Ruby Bug #17519: set_visibility fails when a prepended module and a refinement both exist
- and a demonstration with a custom class:
```ruby
RUBY_VERSION
class Thing
def direction
'LEFT'
end
end
def test_thing_visibility
t1 = Thing.new
t2 = Thing.new
t1.singleton_class.send(:private, :direction)
t2.singleton_... -
07:29 PM Ruby Bug #17519: set_visibility fails when a prepended module and a refinement both exist
- since :except is only available natively on Ruby3, here is a Ruby2 demonstration:
```ruby
irb> RUBY_VERSION
=> "2.7.2"
irb> module Nothing; end; Hash.prepend(Nothing); Hash.ancestors
=> [Nothing, Hash, Enumerable, Object, PP::ObjectMixi... -
07:15 PM Ruby Bug #17519 (Closed): set_visibility fails when a prepended module and a refinement both exist
- the set_visibility functions (aka public/private/protected) fail with NameError when:
* called on a specific object's singleton class
* for a specific method
* and both of the following are true
* any module has been prepended to th...