File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 3
3
describe "FalseClass#singleton_method" do
4
4
ruby_version_is '3.3' do
5
5
it "raises regardless of whether FalseClass defines the method" do
6
- proc { false . singleton_method ( :foo ) } . should raise_error ( NameError )
6
+ -> { false . singleton_method ( :foo ) } . should raise_error ( NameError )
7
7
begin
8
- def false . foo ; end
9
- proc { false . singleton_method ( :foo ) } . should raise_error ( NameError )
8
+ def ( false ) . foo ; end
9
+ -> { false . singleton_method ( :foo ) } . should raise_error ( NameError )
10
10
ensure
11
11
FalseClass . send ( :remove_method , :foo )
12
12
end
Original file line number Diff line number Diff line change 3
3
describe "NilClass#singleton_method" do
4
4
ruby_version_is '3.3' do
5
5
it "raises regardless of whether NilClass defines the method" do
6
- proc { nil . singleton_method ( :foo ) } . should raise_error ( NameError )
6
+ -> { nil . singleton_method ( :foo ) } . should raise_error ( NameError )
7
7
begin
8
- def nil . foo ; end
9
- proc { nil . singleton_method ( :foo ) } . should raise_error ( NameError )
8
+ def ( nil ) . foo ; end
9
+ -> { nil . singleton_method ( :foo ) } . should raise_error ( NameError )
10
10
ensure
11
11
NilClass . send ( :remove_method , :foo )
12
12
end
Original file line number Diff line number Diff line change 3
3
describe "TrueClass#singleton_method" do
4
4
ruby_version_is '3.3' do
5
5
it "raises regardless of whether TrueClass defines the method" do
6
- proc { true . singleton_method ( :foo ) } . should raise_error ( NameError )
6
+ -> { true . singleton_method ( :foo ) } . should raise_error ( NameError )
7
7
begin
8
- def true . foo ; end
9
- proc { true . singleton_method ( :foo ) } . should raise_error ( NameError )
8
+ def ( true ) . foo ; end
9
+ -> { true . singleton_method ( :foo ) } . should raise_error ( NameError )
10
10
ensure
11
11
TrueClass . send ( :remove_method , :foo )
12
12
end
You can’t perform that action at this time.
0 commit comments