summaryrefslogtreecommitdiff
path: root/spec/ruby/core/false/singleton_method_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/false/singleton_method_spec.rb')
-rw-r--r--spec/ruby/core/false/singleton_method_spec.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/spec/ruby/core/false/singleton_method_spec.rb b/spec/ruby/core/false/singleton_method_spec.rb
index 738794b46c..16dc85d67c 100644
--- a/spec/ruby/core/false/singleton_method_spec.rb
+++ b/spec/ruby/core/false/singleton_method_spec.rb
@@ -1,15 +1,13 @@
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
+ it "raises regardless of whether FalseClass defines the method" do
+ -> { false.singleton_method(:foo) }.should raise_error(NameError)
+ begin
+ def (false).foo; end
-> { false.singleton_method(:foo) }.should raise_error(NameError)
- begin
- def (false).foo; end
- -> { false.singleton_method(:foo) }.should raise_error(NameError)
- ensure
- FalseClass.send(:remove_method, :foo)
- end
+ ensure
+ FalseClass.send(:remove_method, :foo)
end
end
end