Skip to content

Commit 73f5306

Browse files
committed
Adapt MRI tests which expect inconsistent behavior for {Unbound,}Method#owner
* See https://bugs.ruby-lang.org/issues/18729
1 parent 1a7cdec commit 73f5306

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/mri/tests/ruby/test_method.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,8 +1057,8 @@ def test_super_method_removed
10571057

10581058
def test_prepended_public_zsuper
10591059
mod = EnvUtil.labeled_module("Mod") {private def foo; :ok end}
1060-
mods = [mod]
10611060
obj = Object.new.extend(mod)
1061+
mods = [obj.singleton_class]
10621062
class << obj
10631063
public :foo
10641064
end
@@ -1299,7 +1299,7 @@ module M2
12991299
::Object.prepend(M2)
13001300
13011301
m = Object.instance_method(:x)
1302-
assert_equal M, m.owner
1302+
assert_equal M2, m.owner
13031303
end;
13041304
end
13051305

0 commit comments

Comments
 (0)