summaryrefslogtreecommitdiff
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
authorJohn Hawthorn <[email protected]>2024-11-26 16:40:47 -0800
committerJohn Hawthorn <[email protected]>2024-11-29 20:41:00 -0800
commitf1dda5ed011b79d0d7bd31b09b55b5e19d8abd0c (patch)
treec041fbb7590bbb9414aab605e00d0c6e570946c8 /test/ruby/test_module.rb
parenta505cd32fb55aec0423c5b57d17ae31c076b44ab (diff)
Warn when redefining __id__ as well as object_id
[Feature #20912]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12177
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r--test/ruby/test_module.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 73d33d8602..4c171bb439 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -1488,7 +1488,7 @@ class TestModule < Test::Unit::TestCase
class << o; self; end.instance_eval { undef_method(:foo) }
end
- %w(object_id __send__ initialize).each do |n|
+ %w(object_id __id__ __send__ initialize).each do |n|
assert_in_out_err([], <<-INPUT, [], %r"warning: undefining '#{n}' may cause serious problems$")
$VERBOSE = false
Class.new.instance_eval { undef_method(:#{n}) }