Skip to content

Commit da0bb33

Browse files
committed
Raise error on unexpected block argument
1 parent 870663a commit da0bb33

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

changeset/spec/spec_helper.rb

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
Warning.ignore(/rspec-core/)
1717
Warning.ignore(/__FILE__/)
1818
Warning.ignore(/__LINE__/)
19+
20+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4')
21+
Warning[:strict_unused_block] = true
22+
end
23+
1924
Warning.process { |w| raise w } if ENV['FAIL_ON_WARNINGS'].eql?('true')
2025

2126
%w[pry-byebug debug pry].each do |gem|

core/spec/spec_helper.rb

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414

1515
Warning.ignore(/__FILE__/)
1616
Warning.ignore(/__LINE__/)
17+
18+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4')
19+
Warning[:strict_unused_block] = true
20+
end
21+
1722
Warning.process { |w| raise w } if ENV['FAIL_ON_WARNINGS'].eql?('true')
1823

1924
Dry::Core::Deprecations.set_logger!(SPEC_ROOT.join('../log/deprecations.log'))

repository/spec/spec_helper.rb

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
Warning.ignore(/rspec-core/)
1818
Warning.ignore(/__FILE__/)
1919
Warning.ignore(/__LINE__/)
20+
21+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4')
22+
Warning[:strict_unused_block] = true
23+
end
24+
2025
Warning.process { |w| raise w } if ENV['FAIL_ON_WARNINGS'].eql?('true')
2126

2227
require 'rom-sql'

0 commit comments

Comments
 (0)