You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/ruby/core/module/define_method_spec.rb
+13-16Lines changed: 13 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -500,34 +500,31 @@ def foo
500
500
}.shouldraise_error(TypeError,/can't bind singleton method to a different class/)
501
501
end
502
502
503
-
it"defines the new method public when the definition frame self is different from the target"do
504
-
foo_class=Class.newdo
505
-
privatedefbar
503
+
it"defines a new method with public visibility when a Method passed and the class/module of the context isn't equal to the receiver of #define_method"do
it"defines the new method according to the scope when the definition context is the same"do
517
-
FooWithOneBar=Class.newdo
518
-
defbar;end
516
+
it"defines the new method according to the scope visibility when a Method passed and the class/module of the context is equal to the receiver of #define_method"do
0 commit comments