blob: 6cf29af411bdefd1ce0140ef472d30fd555fcdf4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
require_relative '../../spec_helper'
describe "FalseClass#singleton_method" do
ruby_version_is '3.3' do
it "raises regardless of whether FalseClass defines the method" do
proc{false.singleton_method(:foo)}.should raise_error(NameError)
begin
def false.foo; end
proc{false.singleton_method(:foo)}.should raise_error(NameError)
ensure
FalseClass.send(:remove_method, :foo)
end
end
end
end
|