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
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -499,6 +499,33 @@ def foo
499
499
Class.new{define_method:bar,m}
500
500
}.shouldraise_error(TypeError,/can't bind singleton method to a different class/)
501
501
end
502
+
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 visibility when a Method passed and the class/module of the context is equal to the receiver of #define_method"do
0 commit comments