-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Description
Behaviour
When, for example, running irb and requiring facets (using Ruby 3.4.2) a warning is displayed:
> irb -r facets
…/.rbenv/versions/3.4.2/lib/ruby/gems/3.4.0/gems/facets-3.1.0/lib/core/facets/kernel/as.rb:103: warning: redefining 'object_id' may cause serious problems
irb(main):001> RUBY_DESCRIPTION
=> "ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +YJIT +PRISM [arm64-darwin24]"Should object_id be included in the regex to exclude operators and binding?
If so, this should do:
lib/core/facets/kernel/as.rb:103:
private(*instance_methods.select { |m| m !~ /(^__|^\W|^binding|^object_id$)/ })Context:
- Ruby version: 3.3.8, 3.4.1, 3.4.2, 3.5.0-preview1
- OS: macOS Sequoia 15.4.1 arm64
Note that using Ruby 3.1.6 do not show this behaviour.
Metadata
Metadata
Assignees
Labels
No labels