We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c01508 commit 5680ac1Copy full SHA for 5680ac1
spec/ruby/core/kernel/public_send_spec.rb
@@ -104,5 +104,13 @@ def bar
104
}.should raise_error(NoMethodError)
105
end
106
107
+ it "includes `public_send` in the backtrace when passed not enough arguments" do
108
+ -> { public_send() }.should raise_error(ArgumentError) { |e| e.backtrace[0].should.include?("`public_send'") }
109
+ end
110
+
111
+ it "includes `public_send` in the backtrace when passed a single incorrect argument" do
112
+ -> { public_send(Object.new) }.should raise_error(TypeError) { |e| e.backtrace[0].should.include?("`public_send'") }
113
114
115
it_behaves_like :basicobject_send, :public_send
116
0 commit comments